nizel-plugin-gfm 0.1.0 → 0.1.1
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 +42 -1
- package/package.json +29 -9
package/README.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# nizel-plugin-gfm
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
GFM-oriented companion preset for [Nizel](https://npmjs.com/package/nizel).
|
|
4
|
+
|
|
5
|
+
Nizel core already handles Markdown fundamentals such as tables, task-list markup, strikethrough, and raw/autolink syntax that belongs in the parser. This package provides a small opt-in preset for first-party plugins that commonly accompany GitHub Flavored Markdown workflows.
|
|
4
6
|
|
|
5
7
|
The browser build exposes `NizelGfm` from `dist/gfm.iife.js`.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install nizel-plugin-gfm
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { useNizel } from 'nizel';
|
|
19
|
+
import { gfmPlugin, gfmPlugins } from 'nizel-plugin-gfm';
|
|
20
|
+
|
|
21
|
+
const nizel = useNizel({
|
|
22
|
+
plugins: [gfmPlugin()],
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const explicit = useNizel({
|
|
26
|
+
plugins: gfmPlugins({ alerts: true, autolinks: true }),
|
|
27
|
+
});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Included Plugins
|
|
31
|
+
|
|
32
|
+
By default the preset enables:
|
|
33
|
+
|
|
34
|
+
- `nizel-plugin-autolink`
|
|
35
|
+
- `nizel-plugin-alert`
|
|
36
|
+
|
|
37
|
+
## Options
|
|
38
|
+
|
|
39
|
+
| Option | Type | Default | Description |
|
|
40
|
+
| --- | --- | --- | --- |
|
|
41
|
+
| `alerts` | `boolean` | `true` | Include GitHub-style alert/callout support. |
|
|
42
|
+
| `autolinks` | `boolean` | `true` | Include configurable bare URL and email autolinks. |
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,27 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nizel-plugin-gfm",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "GFM-oriented plugin preset for Nizel.",
|
|
5
|
-
"repository": {
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/silvandiepen/nizel"
|
|
8
|
+
},
|
|
6
9
|
"type": "module",
|
|
7
10
|
"main": "./dist/index.js",
|
|
8
11
|
"types": "./dist/index.d.ts",
|
|
9
12
|
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./browser": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"import": "./dist/index.js"
|
|
20
|
+
}
|
|
12
21
|
},
|
|
13
|
-
"files": [
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"README.md"
|
|
25
|
+
],
|
|
14
26
|
"scripts": {
|
|
15
27
|
"build": "tsc -p tsconfig.json && npm run build:browser",
|
|
16
28
|
"build:browser": "esbuild src/index.ts --bundle --platform=browser --format=iife --global-name=NizelGfm --target=safari14 --outfile=dist/gfm.iife.js",
|
|
17
29
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
18
|
-
"test": "npm run build && vitest run test/*.mjs"
|
|
30
|
+
"test": "npm run build && vitest run test/*.mjs",
|
|
31
|
+
"test:run": "vitest run test/*.mjs"
|
|
19
32
|
},
|
|
20
33
|
"dependencies": {
|
|
21
34
|
"nizel-plugin-alert": "^0.1.0",
|
|
22
35
|
"nizel-plugin-autolink": "^0.1.0"
|
|
23
36
|
},
|
|
24
|
-
"peerDependencies": {
|
|
25
|
-
|
|
26
|
-
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"nizel": "^0.1.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"esbuild": "^0.27.3"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public",
|
|
45
|
+
"provenance": true
|
|
46
|
+
}
|
|
27
47
|
}
|