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.10 to 0.0.11

2

CHANGELOG.md

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

## [v0.0.10](https://github.com/sw-yx/ssg/compare/v0.0.3...v0.0.10) - 2019-09-14
## [v0.0.11](https://github.com/sw-yx/ssg/compare/v0.0.3...v0.0.11) - 2019-09-14

@@ -13,0 +13,0 @@ ### Commits

@@ -20,2 +20,20 @@ "use strict";

*
* run getInitialData only once
*
*/
function getSSGDataOnce(ssgConfig) {
return __awaiter(this, void 0, void 0, function* () {
if (ssgConfig.getInitialData) {
const data = yield ssgConfig.getInitialData();
const dotFolderPath = path_1.default.join(path_1.default.resolve(ssgConfig.ssgDotFolder), '.ssg');
const dotFolderDataPath = path_1.default.join(dotFolderPath, 'data.json');
if (!fs_1.default.existsSync(dotFolderPath))
fs_1.default.mkdirSync(dotFolderPath);
fs_1.default.writeFileSync(dotFolderDataPath, data);
}
});
}
exports.getSSGDataOnce = getSSGDataOnce;
/**
*
* read ssg config and ensure defaults exist

@@ -29,2 +47,3 @@ *

ssgConfig.configPath = ssgConfigPath;
ssgConfig.ssgDotFolder = ssgConfig.ssgDotFolder || '.ssg';
ssgConfig.contentFolder = ssgConfig.contentFolder || 'content';

@@ -31,0 +50,0 @@ return ssgConfig;

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

const { dev } = yield Promise.resolve().then(() => __importStar(require('sapper/api')));
const { watchSSGFiles, readSSGConfig } = yield Promise.resolve().then(() => __importStar(require('./cli-ssg')));
const { getSSGDataOnce, watchSSGFiles, readSSGConfig } = yield Promise.resolve().then(() => __importStar(require('./cli-ssg')));
try {

@@ -85,2 +85,3 @@ const watcher = dev({

// actually do stuff with it
yield getSSGDataOnce(ssgConfig);
watchSSGFiles(watcher, ssgConfig);

@@ -87,0 +88,0 @@ /**

{
"name": "ssg",
"version": "0.0.10",
"version": "0.0.11",
"license": "MIT",

@@ -5,0 +5,0 @@ "bin": {

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