Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ssg

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssg - npm Package Compare versions

Comparing version 0.0.42 to 0.0.43

5

CHANGELOG.md

@@ -10,3 +10,3 @@ # Changelog

## [v0.0.42](https://github.com/sw-yx/ssg/compare/v0.0.40...v0.0.42) - 2019-11-04
## [v0.0.43](https://github.com/sw-yx/ssg/compare/v0.0.40...v0.0.43) - 2019-11-04

@@ -16,3 +16,4 @@ ### Commits

- fix the zeroconfig experience to make it run data properly [`93bc717`](https://github.com/sw-yx/ssg/commit/93bc717bd198ac0b5b7b2f6afe8cbeb7dbf93263)
- Update README.md [`cc5f9ba`](https://github.com/sw-yx/ssg/commit/cc5f9bafbb898ac1f9701ee40901a91c2761ef73)
- bump yarn lock [`55a8972`](https://github.com/sw-yx/ssg/commit/55a897276416f4d36fcca896a0338f08523b8df6)
- update sapperfork and coreData plugin [`d393b3c`](https://github.com/sw-yx/ssg/commit/d393b3cdc2f5a200bfe84fc5fbd76a3c254bf483)

@@ -19,0 +20,0 @@ ## [v0.0.40](https://github.com/sw-yx/ssg/compare/v0.0.38...v0.0.40) - 2019-10-28

14

dist/coreData.js

@@ -58,3 +58,3 @@ "use strict";

opts = {};
let _dirPath = opts.dirPath || path.resolve('.');
let startDirPath = opts.dirPath || path.resolve('.');
if (opts.modifyRecognizedExtensions) {

@@ -69,7 +69,9 @@ _recognizedExtensions = produce(_recognizedExtensions, opts.modifyRecognizedExtensions);

// is recursive!
function createIndex(recursiveDir = _dirPath) {
function createIndex(recursiveDir = startDirPath) {
return __awaiter(this, void 0, void 0, function* () {
const files = yield readdir(recursiveDir);
const getStats = (file, _dirPath) => __awaiter(this, void 0, void 0, function* () {
const filePath = path.join(_dirPath, file);
const getStats = (file, dirPath) => __awaiter(this, void 0, void 0, function* () {
const filePath = path.join(dirPath, file);
let shortFilePath = path.parse(path.relative(startDirPath, filePath));
shortFilePath = shortFilePath.dir + '/' + shortFilePath.name; // drop the extension, could be '.md' but also anything else
const st = yield stat(filePath);

@@ -94,7 +96,7 @@ if (st.isDirectory()) {

metadata.date = new Date(pubdate);
const slug = metadata.slug || metadata.permalink || slugify(filePath);
const slug = metadata.slug || metadata.permalink || slugify(shortFilePath);
return [
{
slug,
filePath,
filePath: shortFilePath,
createdAt: st.birthtime,

@@ -101,0 +103,0 @@ modifiedAt: st.mtime,

{
"name": "ssg",
"version": "0.0.42",
"version": "0.0.43",
"license": "MIT",

@@ -24,3 +24,3 @@ "bin": {

"@sindresorhus/slugify": "^0.9.1",
"@ssgjs/sapper": "^0.27.9-fork.13",
"@ssgjs/sapper": "^0.27.9-fork.14",
"chalk": "^2.4.2",

@@ -27,0 +27,0 @@ "chokidar": "^3.0.2",

@@ -139,6 +139,5 @@ # Sapper Site Generator

cosnt key = 'posts'
const res = await this.fetch(`data/${key}___ssg___${params.slug}.json`)
const data = await res.json()
const res = await this.ssgData(key, params.slug)
if (res.status === 200) {
return { post: data }
return data
} else {

@@ -149,2 +148,5 @@ this.error(res.status, data.message)

</script>
<script>
export let data
</script>
```

@@ -151,0 +153,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc