@powerlines/plugin-marked 0.1.422 → 0.1.424
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.cjs +29 -1
- package/dist/index.cjs +40 -1
- package/dist/index.mjs +36 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/plugin.mjs +1 -1
- package/package.json +4 -4
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
exports.__toESM = __toESM;
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1,40 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let defu = require("defu");
|
|
4
|
+
defu = require_runtime.__toESM(defu, 1);
|
|
5
|
+
let marked = require("marked");
|
|
6
|
+
|
|
7
|
+
//#region src/index.ts
|
|
8
|
+
/**
|
|
9
|
+
* Marked Plugin
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* A Powerlines plugin to use the Marked markdown transformer during the prepare task.
|
|
13
|
+
*
|
|
14
|
+
* @see https://marked.js.org
|
|
15
|
+
*
|
|
16
|
+
* @param options - The plugin options.
|
|
17
|
+
* @returns A Powerlines plugin instance.
|
|
18
|
+
*/
|
|
19
|
+
const plugin = (options = {}) => {
|
|
20
|
+
return {
|
|
21
|
+
name: "marked",
|
|
22
|
+
async config() {
|
|
23
|
+
return { marked: (0, defu.default)(options, {
|
|
24
|
+
async: true,
|
|
25
|
+
breaks: true,
|
|
26
|
+
gfm: true,
|
|
27
|
+
silent: !this.config.logLevel
|
|
28
|
+
}) };
|
|
29
|
+
},
|
|
30
|
+
async configResolved() {
|
|
31
|
+
this.marked ??= {};
|
|
32
|
+
this.marked.parse ??= async (src, override = {}) => marked.marked.parse(src, (0, defu.default)(override, this.config.marked));
|
|
33
|
+
this.marked.use ??= (...args) => marked.marked.use(...args);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
exports.default = plugin;
|
|
40
|
+
exports.plugin = plugin;
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,37 @@
|
|
|
1
|
-
import
|
|
1
|
+
import defu from "defu";
|
|
2
|
+
import { marked } from "marked";
|
|
3
|
+
|
|
4
|
+
//#region src/index.ts
|
|
5
|
+
/**
|
|
6
|
+
* Marked Plugin
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* A Powerlines plugin to use the Marked markdown transformer during the prepare task.
|
|
10
|
+
*
|
|
11
|
+
* @see https://marked.js.org
|
|
12
|
+
*
|
|
13
|
+
* @param options - The plugin options.
|
|
14
|
+
* @returns A Powerlines plugin instance.
|
|
15
|
+
*/
|
|
16
|
+
const plugin = (options = {}) => {
|
|
17
|
+
return {
|
|
18
|
+
name: "marked",
|
|
19
|
+
async config() {
|
|
20
|
+
return { marked: defu(options, {
|
|
21
|
+
async: true,
|
|
22
|
+
breaks: true,
|
|
23
|
+
gfm: true,
|
|
24
|
+
silent: !this.config.logLevel
|
|
25
|
+
}) };
|
|
26
|
+
},
|
|
27
|
+
async configResolved() {
|
|
28
|
+
this.marked ??= {};
|
|
29
|
+
this.marked.parse ??= async (src, override = {}) => marked.parse(src, defu(override, this.config.marked));
|
|
30
|
+
this.marked.use ??= (...args) => marked.use(...args);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { plugin as default, plugin };
|
|
2
37
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport defu from \"defu\";\nimport { marked, MarkedExtension, MarkedOptions } from \"marked\";\nimport { Plugin } from \"powerlines\";\nimport { MarkedPluginContext, MarkedPluginOptions } from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n marked?: MarkedPluginOptions;\n }\n}\n\n/**\n * Marked Plugin\n *\n * @remarks\n * A Powerlines plugin to use the Marked markdown transformer during the prepare task.\n *\n * @see https://marked.js.org\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends MarkedPluginContext = MarkedPluginContext\n>(\n options: MarkedPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"marked\",\n async config() {\n return {\n marked: defu(options, {\n async: true,\n breaks: true,\n gfm: true,\n silent: !this.config.logLevel\n })\n };\n },\n async configResolved() {\n this.marked ??= {} as TContext[\"marked\"];\n this.marked.parse ??= async (\n src: string,\n override: Partial<MarkedOptions> = {}\n ) =>\n marked.parse(src, defu(override, this.config.marked) as MarkedOptions);\n this.marked.use ??= (...args: MarkedExtension[]) => marked.use(...args);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport defu from \"defu\";\nimport { marked, MarkedExtension, MarkedOptions } from \"marked\";\nimport { Plugin } from \"powerlines\";\nimport { MarkedPluginContext, MarkedPluginOptions } from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n marked?: MarkedPluginOptions;\n }\n}\n\n/**\n * Marked Plugin\n *\n * @remarks\n * A Powerlines plugin to use the Marked markdown transformer during the prepare task.\n *\n * @see https://marked.js.org\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends MarkedPluginContext = MarkedPluginContext\n>(\n options: MarkedPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"marked\",\n async config() {\n return {\n marked: defu(options, {\n async: true,\n breaks: true,\n gfm: true,\n silent: !this.config.logLevel\n })\n };\n },\n async configResolved() {\n this.marked ??= {} as TContext[\"marked\"];\n this.marked.parse ??= async (\n src: string,\n override: Partial<MarkedOptions> = {}\n ) =>\n marked.parse(src, defu(override, this.config.marked) as MarkedOptions);\n this.marked.use ??= (...args: MarkedExtension[]) => marked.use(...args);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;AA0CA,MAAa,UAGX,UAA+B,EAAE,KACZ;AACrB,QAAO;EACL,MAAM;EACN,MAAM,SAAS;AACb,UAAO,EACL,QAAQ,KAAK,SAAS;IACpB,OAAO;IACP,QAAQ;IACR,KAAK;IACL,QAAQ,CAAC,KAAK,OAAO;IACtB,CAAC,EACH;;EAEH,MAAM,iBAAiB;AACrB,QAAK,WAAW,EAAE;AAClB,QAAK,OAAO,UAAU,OACpB,KACA,WAAmC,EAAE,KAErC,OAAO,MAAM,KAAK,KAAK,UAAU,KAAK,OAAO,OAAO,CAAkB;AACxE,QAAK,OAAO,SAAS,GAAG,SAA4B,OAAO,IAAI,GAAG,KAAK;;EAE1E"}
|
package/dist/types/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|
package/dist/types/plugin.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-marked",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.424",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Powerlines plugin to use the Marked markdown compiler to generate HTML.",
|
|
6
6
|
"keywords": ["marked", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -94,15 +94,15 @@
|
|
|
94
94
|
"@stryke/path": "^0.28.2",
|
|
95
95
|
"@stryke/types": "^0.12.0",
|
|
96
96
|
"defu": "^6.1.7",
|
|
97
|
-
"powerlines": "^0.46.
|
|
97
|
+
"powerlines": "^0.46.6"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
100
|
+
"@powerlines/plugin-plugin": "^0.12.410",
|
|
101
101
|
"@types/node": "^25.6.0",
|
|
102
102
|
"marked": "^17.0.6"
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": { "marked": ">=17.0.4" },
|
|
105
105
|
"peerDependenciesMeta": { "marked": { "optional": false } },
|
|
106
106
|
"publishConfig": { "access": "public" },
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "610c4c943933458c5f433b9002d8c187625b2d3f"
|
|
108
108
|
}
|