Socket
Socket
Sign inDemoInstall

ssg-api

Package Overview
Dependencies
Maintainers
0
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssg-api - npm Package Compare versions

Comparing version 1.11.0 to 1.12.0

6

CHANGELOG.md

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

## [1.12.0] - 2024-07-15
### Changed
- `ClassDomReplaceCommand` now support multiple class names, which implies the relevant parameter has been moved as the last one.
## [1.11.0] - 2024-07-02

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

10

dist/src/step/content/replace/html/class/ClassDomReplaceCommand.d.ts

@@ -6,9 +6,13 @@ import { ReplacerFactory } from "../../ReplacerFactory.js";

/**
* A replacer that looks for a class in tags.
* A replacer that looks for HTML class(es) in tags.
*/
export declare class ClassDomReplaceCommand<T extends HTMLElement = HTMLElement> extends DomReplaceCommand<T> {
protected className: string;
protected replacerFactory: ReplacerFactory<DomReplacer<T>>;
constructor(className: string, replacerFactory: ReplacerFactory<DomReplacer<T>>);
/**
*
* @param replacerFactory The object that creates the replacer when needed.
* @param classNames The classname(s) to look for.
*/
constructor(replacerFactory: ReplacerFactory<DomReplacer<T>>, ...classNames: string[]);
protected createReplacer(context: HtmlSsgContext): Promise<DomReplacer<T>>;
}
import { DomReplaceCommand } from "../../DomReplaceCommand.js";
/**
* A replacer that looks for a class in tags.
* A replacer that looks for HTML class(es) in tags.
*/
export class ClassDomReplaceCommand extends DomReplaceCommand {
constructor(className, replacerFactory) {
super(`.${className}`);
this.className = className;
/**
*
* @param replacerFactory The object that creates the replacer when needed.
* @param classNames The classname(s) to look for.
*/
constructor(replacerFactory, ...classNames) {
super(classNames.map(className => '.' + className).join(","));
this.replacerFactory = replacerFactory;

@@ -10,0 +14,0 @@ }

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

"author": "Jérôme Beau <javarome@gmail.com> (https://javarome.com)",
"version": "1.11.0",
"version": "1.12.0",
"description": "Static Site Generation TypeScript API",

@@ -24,3 +24,3 @@ "exports": "./dist/src/index.js",

"test": "rm -Rf out && tsx src/testAll.ts",
"test-one": "rm -Rf out && tsx src/step/content/replace/angular/AngularExpressionReplaceCommandTest.ts",
"test-one": "rm -Rf out && tsx src/step/content/replace/html/class/ClassDomReplaceCommandTest.ts",
"test-ci": "rm -Rf out && tsx src/testAll.ts"

@@ -27,0 +27,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