@frontmatter/extensibility
Advanced tools
Comparing version 0.0.11-beta.6480624 to 0.0.11-beta.6480646
@@ -9,2 +9,9 @@ import { ContentArguments } from "../models/ScriptArguments.js"; | ||
static getArguments(): ContentArguments | undefined; | ||
/** | ||
* Call this method to update the front matter | ||
* @param data | ||
*/ | ||
static updateFrontMatter(data: { | ||
[fieldName: string]: any; | ||
}): void; | ||
} |
@@ -22,3 +22,4 @@ import { CustomScript } from "./CustomScript.js"; | ||
try { | ||
frontMatter = typeof frontMatter === "string" ? JSON.parse(frontMatter) : frontMatter; | ||
frontMatter = | ||
typeof frontMatter === "string" ? JSON.parse(frontMatter) : frontMatter; | ||
} | ||
@@ -44,3 +45,12 @@ catch (e) { | ||
} | ||
/** | ||
* Call this method to update the front matter | ||
* @param data | ||
*/ | ||
static updateFrontMatter(data) { | ||
console.log(JSON.stringify({ | ||
frontmatter: data, | ||
})); | ||
} | ||
} | ||
//# sourceMappingURL=ContentScript.js.map |
@@ -9,9 +9,2 @@ import { Question } from "../models/Question.js"; | ||
/** | ||
* Call this method to update the front matter | ||
* @param data | ||
*/ | ||
static updateFrontMatter(data: { | ||
[fieldName: string]: any; | ||
}): void; | ||
/** | ||
* Call this method to indicate that the script has finished. | ||
@@ -18,0 +11,0 @@ * @param log |
@@ -12,11 +12,2 @@ export class CustomScript { | ||
/** | ||
* Call this method to update the front matter | ||
* @param data | ||
*/ | ||
static updateFrontMatter(data) { | ||
console.log(JSON.stringify({ | ||
frontmatter: data, | ||
})); | ||
} | ||
/** | ||
* Call this method to indicate that the script has finished. | ||
@@ -23,0 +14,0 @@ * @param log |
{ | ||
"name": "@frontmatter/extensibility", | ||
"version": "0.0.11-beta.6480624", | ||
"version": "0.0.11-beta.6480646", | ||
"description": "Front Matter CMS extensibility library", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -28,3 +28,4 @@ import { ContentArguments } from "../models/ScriptArguments.js"; | ||
try { | ||
frontMatter = typeof frontMatter === "string" ? JSON.parse(frontMatter) : frontMatter; | ||
frontMatter = | ||
typeof frontMatter === "string" ? JSON.parse(frontMatter) : frontMatter; | ||
} catch (e) { | ||
@@ -51,2 +52,14 @@ // Failed parsing JSON | ||
} | ||
/** | ||
* Call this method to update the front matter | ||
* @param data | ||
*/ | ||
public static updateFrontMatter(data: { [fieldName: string]: any }): void { | ||
console.log( | ||
JSON.stringify({ | ||
frontmatter: data, | ||
}) | ||
); | ||
} | ||
} |
@@ -17,14 +17,2 @@ import { Question } from "../models/Question.js"; | ||
/** | ||
* Call this method to update the front matter | ||
* @param data | ||
*/ | ||
public static updateFrontMatter(data: { [fieldName: string]: any }): void { | ||
console.log( | ||
JSON.stringify({ | ||
frontmatter: data, | ||
}) | ||
); | ||
} | ||
/** | ||
* Call this method to indicate that the script has finished. | ||
@@ -31,0 +19,0 @@ * @param log |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32764
641