Socket
Socket
Sign inDemoInstall

ssg-api

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.0 to 1.4.1

6

CHANGELOG.md

@@ -8,2 +8,8 @@ # Change Log

## [1.4.1] - 2023-01-22
### Added
- Overridable method to allow processing a content file.
## [1.4.0] - 2023-01-22

@@ -10,0 +16,0 @@

1

dist/src/step/content/ContentStep.d.ts

@@ -44,2 +44,3 @@ import { SsgStep } from "../SsgStep";

protected processFile(context: C, filePath: string, contentsConfig: ContentStepConfig, fileCount: number): Promise<number>;
protected shouldProcess(context: C): boolean;
}

19

dist/src/step/content/ContentStep.js

@@ -49,2 +49,12 @@ import { promise as glob } from "glob-promise";

context.outputFile = contentsConfig.getOutputFile(context);
if (this.shouldProcess(context)) {
for (const replacement of contentsConfig.replacements) {
context.outputFile = await replacement.execute(context);
}
fileCount++;
await this.output(context, context.outputFile);
}
return fileCount;
}
shouldProcess(context) {
let process;

@@ -62,11 +72,4 @@ const exists = fs.existsSync(context.outputFile.name);

}
if (process) {
for (const replacement of contentsConfig.replacements) {
context.outputFile = await replacement.execute(context);
}
fileCount++;
await this.output(context, context.outputFile);
}
return fileCount;
return process;
}
}

@@ -5,3 +5,3 @@ {

"author": "Jérôme Beau",
"version": "1.4.0",
"version": "1.4.1",
"description": "Static Site Generation TypeScript API",

@@ -8,0 +8,0 @@ "exports": "./dist/src/index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc