nizel-plugin-gfm 0.1.0
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/README.md +5 -0
- package/dist/gfm.iife.js +4538 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/package.json +27 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { NizelPlugin } from 'nizel';
|
|
2
|
+
export type GfmPluginOptions = {
|
|
3
|
+
alerts?: boolean;
|
|
4
|
+
autolinks?: boolean;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Returns the opt-in plugin set that complements Nizel's built-in GFM-like features.
|
|
8
|
+
*/
|
|
9
|
+
export declare const gfmPlugins: (options?: GfmPluginOptions) => NizelPlugin[];
|
|
10
|
+
export declare const gfmPlugin: (options?: GfmPluginOptions) => NizelPlugin;
|
|
11
|
+
export default gfmPlugin;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAIzC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,UAAS,gBAAqB,KAAG,WAAW,EAGtE,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,UAAS,gBAAqB,KAAG,WAKzD,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { alertPlugin } from 'nizel-plugin-alert';
|
|
2
|
+
import { autolinkPlugin } from 'nizel-plugin-autolink';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the opt-in plugin set that complements Nizel's built-in GFM-like features.
|
|
5
|
+
*/
|
|
6
|
+
export const gfmPlugins = (options = {}) => [
|
|
7
|
+
...(options.autolinks === false ? [] : [autolinkPlugin()]),
|
|
8
|
+
...(options.alerts === false ? [] : [alertPlugin()]),
|
|
9
|
+
];
|
|
10
|
+
export const gfmPlugin = (options = {}) => ({
|
|
11
|
+
name: 'gfm',
|
|
12
|
+
options: {
|
|
13
|
+
plugins: gfmPlugins(options),
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
export default gfmPlugin;
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAOvD;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,UAA4B,EAAE,EAAiB,EAAE,CAAC;IAC3E,GAAG,CAAC,OAAO,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC;IAC1D,GAAG,CAAC,OAAO,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;CACrD,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,UAA4B,EAAE,EAAe,EAAE,CAAC,CAAC;IACzE,IAAI,EAAE,KAAK;IACX,OAAO,EAAE;QACP,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC;KAC7B;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nizel-plugin-gfm",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "GFM-oriented plugin preset for Nizel.",
|
|
5
|
+
"repository": { "type": "git", "url": "https://github.com/silvandiepen/nizel" },
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" },
|
|
11
|
+
"./browser": { "types": "./dist/index.d.ts", "import": "./dist/index.js" }
|
|
12
|
+
},
|
|
13
|
+
"files": ["dist", "README.md"],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc -p tsconfig.json && npm run build:browser",
|
|
16
|
+
"build:browser": "esbuild src/index.ts --bundle --platform=browser --format=iife --global-name=NizelGfm --target=safari14 --outfile=dist/gfm.iife.js",
|
|
17
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
18
|
+
"test": "npm run build && vitest run test/*.mjs"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"nizel-plugin-alert": "^0.1.0",
|
|
22
|
+
"nizel-plugin-autolink": "^0.1.0"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": { "nizel": "^0.1.0" },
|
|
25
|
+
"devDependencies": { "esbuild": "^0.27.3" },
|
|
26
|
+
"publishConfig": { "access": "public", "provenance": true }
|
|
27
|
+
}
|