remark-inline-svg-flex 0.3.5 → 0.3.7
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/.github/workflows/release.yml +60 -0
- package/LICENSE +21 -21
- package/README.md +129 -129
- package/package.json +58 -58
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- package.json
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
release:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
|
|
22
|
+
- name: get version
|
|
23
|
+
run: echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
|
|
24
|
+
|
|
25
|
+
- name: check if tag exists
|
|
26
|
+
id: tagcheck
|
|
27
|
+
run: |
|
|
28
|
+
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
|
|
29
|
+
echo "exists=true" >> $GITHUB_OUTPUT
|
|
30
|
+
else
|
|
31
|
+
echo "exists=false" >> $GITHUB_OUTPUT
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
- uses: actions/setup-node@v4
|
|
35
|
+
if: steps.tagcheck.outputs.exists == 'false'
|
|
36
|
+
with:
|
|
37
|
+
node-version: 24
|
|
38
|
+
registry-url: https://registry.npmjs.org/
|
|
39
|
+
|
|
40
|
+
- name: build, publish and release
|
|
41
|
+
if: steps.tagcheck.outputs.exists == 'false'
|
|
42
|
+
env:
|
|
43
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
44
|
+
run: |
|
|
45
|
+
npm ci
|
|
46
|
+
npm run build
|
|
47
|
+
git config user.name "github-actions"
|
|
48
|
+
git config user.email "github-actions@github.com"
|
|
49
|
+
git tag "v$VERSION"
|
|
50
|
+
git push origin "v$VERSION"
|
|
51
|
+
npm publish
|
|
52
|
+
|
|
53
|
+
- name: create Github release
|
|
54
|
+
if: steps.tagcheck.outputs.exists == 'false'
|
|
55
|
+
uses: softprops/action-gh-release@v2
|
|
56
|
+
env:
|
|
57
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
58
|
+
with:
|
|
59
|
+
tag_name: v${{ env.VERSION }}
|
|
60
|
+
name: Release v${{ env.VERSION }}
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 gass-git
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 gass-git
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
> ⚠️ Beta Nearing v1.0.0 — APIs may still change slightly.
|
|
2
|
-
|
|
3
|
-
# remark-inline-svg-flex
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/remark-inline-svg-flex)
|
|
6
|
-
[](https://www.npmjs.com/package/remark-inline-svg-flex)
|
|
7
|
-
[](https://github.com/gass-git/remark-inline-svg-flex/blob/main/LICENSE)
|
|
8
|
-
|
|
9
|
-
Flexible Remark plugin that inlines and optimizes SVGs with SVGO, featuring customizable path resolution, wrappers and others.
|
|
10
|
-
|
|
11
|
-
- [remark-inline-svg-flex](#remark-inline-svg-flex)
|
|
12
|
-
- [Features](#features)
|
|
13
|
-
- [Installation](#installation)
|
|
14
|
-
- [Usage](#usage)
|
|
15
|
-
- [Options](#options)
|
|
16
|
-
- [`suffix`](#suffix)
|
|
17
|
-
- [`assetsDir`](#assetsdir)
|
|
18
|
-
- [`wrapper`](#wrapper)
|
|
19
|
-
- [`svgo`](#svgo)
|
|
20
|
-
- [SVGO configuration](#svgo-configuration)
|
|
21
|
-
|
|
22
|
-
## Features
|
|
23
|
-
|
|
24
|
-
### ✔️ Robust and customizable path resolution
|
|
25
|
-
|
|
26
|
-
- If the SVG path is absolute, it is used as-is.
|
|
27
|
-
- If the path is relative and assetsDir is defined, it is resolved relative to that directory.
|
|
28
|
-
- Otherwise, the path is resolved relative to the Markdown file’s location.
|
|
29
|
-
|
|
30
|
-
### ✔️ Custom HTML wrapper support
|
|
31
|
-
|
|
32
|
-
Use your own custom HTML wrapper, no wrapper at all, or the default:
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
<figure class="inline-svg"></figure>
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### ✔️ Optional SVG optimization
|
|
39
|
-
|
|
40
|
-
SVG optimization can be disabled if needed e.g. if SVGO removes required attributes.
|
|
41
|
-
|
|
42
|
-
### ✔️ Configurable suffix
|
|
43
|
-
|
|
44
|
-
By default, only files ending in `.svg` are processed. You can customize the suffix to suit your needs.
|
|
45
|
-
|
|
46
|
-
## Installation
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
npm i remark-inline-svg-flex
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Usage
|
|
53
|
-
|
|
54
|
-
Say we have the following file `example.md`:
|
|
55
|
-
|
|
56
|
-
```markdown
|
|
57
|
-
# Hello
|
|
58
|
-
|
|
59
|
-
This is a test markdown document.
|
|
60
|
-
|
|
61
|
-

|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
And our module `example.js` looks as the one below. It is recommended to pass
|
|
65
|
-
the markdown directory path to `process()` so that the plugin can resolve relative
|
|
66
|
-
paths correctly.
|
|
67
|
-
|
|
68
|
-
```js
|
|
69
|
-
import { remark } from 'remark';
|
|
70
|
-
import { readFile } from 'node:fs/promises';
|
|
71
|
-
import { remarkInlineSvg } from 'remark-inline-svg-flex';
|
|
72
|
-
|
|
73
|
-
const markdown = await readFile(_path, { encoding: 'utf8' });
|
|
74
|
-
|
|
75
|
-
return await remark()
|
|
76
|
-
.use(remarkParse)
|
|
77
|
-
.use(remarkInlineSvg)
|
|
78
|
-
.process({ value: markdown, path: _path });
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Now running `node example.js` yields:
|
|
82
|
-
|
|
83
|
-
```markdown
|
|
84
|
-
# Hello
|
|
85
|
-
|
|
86
|
-
This is a test markdown document.
|
|
87
|
-
|
|
88
|
-
<figure class="inline-svg">
|
|
89
|
-
<svg fill="none" viewBox="0 0 250 250" role="img" aria-hidden="true"><circle cx="125" cy="125" r="100" fill="#BA5B5B"/></svg>
|
|
90
|
-
</figure>
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
## Options
|
|
94
|
-
|
|
95
|
-
| Key | type | Default value | Description |
|
|
96
|
-
| ------------------------- | --------------------- | ---------------------------------------- | ---------------------------------------------------------- |
|
|
97
|
-
| [`suffix`](#suffix) | `string` | `'.svg'` | The plugin only processes SVG files ending with this value |
|
|
98
|
-
| [`assetsDir`](#assetsdir) | `string \| undefined` | `undefined` | Base directory where SVG files are located |
|
|
99
|
-
| [`wrapper`](#wrapper) | `string` | `'<figure class="inline-svg"></figure>'` | HTML wrapper used to wrap the inlined SVG |
|
|
100
|
-
| [`svgo`](#svgo) | `boolean` | `true` | Enable or disable SVG optimization |
|
|
101
|
-
|
|
102
|
-
### `suffix`
|
|
103
|
-
|
|
104
|
-
Only image nodes whose URL ends with the specified suffix will be processed. Defaults to `'.svg'`.
|
|
105
|
-
|
|
106
|
-
### `assetsDir`
|
|
107
|
-
|
|
108
|
-
Base directory where SVG files are located. By default is `undefined` and it will resolve paths either in an absolute or relative manner.
|
|
109
|
-
|
|
110
|
-
### `wrapper`
|
|
111
|
-
|
|
112
|
-
Defines the HTML wrapper used around the inlined SVG.
|
|
113
|
-
|
|
114
|
-
- Set to an empty string `''` to disable wrapping entirely.
|
|
115
|
-
- Defaults to:
|
|
116
|
-
|
|
117
|
-
```
|
|
118
|
-
<figure class="inline-svg"></figure>
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### `svgo`
|
|
122
|
-
|
|
123
|
-
The SVG's are optimized by default. Disable it by setting it to `false`.
|
|
124
|
-
|
|
125
|
-
## SVGO configuration
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
{ plugins: ['preset-default', 'removeXMLNS'] }
|
|
129
|
-
```
|
|
1
|
+
> ⚠️ Beta Nearing v1.0.0 — APIs may still change slightly.
|
|
2
|
+
|
|
3
|
+
# remark-inline-svg-flex
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/remark-inline-svg-flex)
|
|
6
|
+
[](https://www.npmjs.com/package/remark-inline-svg-flex)
|
|
7
|
+
[](https://github.com/gass-git/remark-inline-svg-flex/blob/main/LICENSE)
|
|
8
|
+
|
|
9
|
+
Flexible Remark plugin that inlines and optimizes SVGs with SVGO, featuring customizable path resolution, wrappers and others.
|
|
10
|
+
|
|
11
|
+
- [remark-inline-svg-flex](#remark-inline-svg-flex)
|
|
12
|
+
- [Features](#features)
|
|
13
|
+
- [Installation](#installation)
|
|
14
|
+
- [Usage](#usage)
|
|
15
|
+
- [Options](#options)
|
|
16
|
+
- [`suffix`](#suffix)
|
|
17
|
+
- [`assetsDir`](#assetsdir)
|
|
18
|
+
- [`wrapper`](#wrapper)
|
|
19
|
+
- [`svgo`](#svgo)
|
|
20
|
+
- [SVGO configuration](#svgo-configuration)
|
|
21
|
+
|
|
22
|
+
## Features
|
|
23
|
+
|
|
24
|
+
### ✔️ Robust and customizable path resolution
|
|
25
|
+
|
|
26
|
+
- If the SVG path is absolute, it is used as-is.
|
|
27
|
+
- If the path is relative and assetsDir is defined, it is resolved relative to that directory.
|
|
28
|
+
- Otherwise, the path is resolved relative to the Markdown file’s location.
|
|
29
|
+
|
|
30
|
+
### ✔️ Custom HTML wrapper support
|
|
31
|
+
|
|
32
|
+
Use your own custom HTML wrapper, no wrapper at all, or the default:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
<figure class="inline-svg"></figure>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### ✔️ Optional SVG optimization
|
|
39
|
+
|
|
40
|
+
SVG optimization can be disabled if needed e.g. if SVGO removes required attributes.
|
|
41
|
+
|
|
42
|
+
### ✔️ Configurable suffix
|
|
43
|
+
|
|
44
|
+
By default, only files ending in `.svg` are processed. You can customize the suffix to suit your needs.
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
npm i remark-inline-svg-flex
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
Say we have the following file `example.md`:
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
# Hello
|
|
58
|
+
|
|
59
|
+
This is a test markdown document.
|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
And our module `example.js` looks as the one below. It is recommended to pass
|
|
65
|
+
the markdown directory path to `process()` so that the plugin can resolve relative
|
|
66
|
+
paths correctly.
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
import { remark } from 'remark';
|
|
70
|
+
import { readFile } from 'node:fs/promises';
|
|
71
|
+
import { remarkInlineSvg } from 'remark-inline-svg-flex';
|
|
72
|
+
|
|
73
|
+
const markdown = await readFile(_path, { encoding: 'utf8' });
|
|
74
|
+
|
|
75
|
+
return await remark()
|
|
76
|
+
.use(remarkParse)
|
|
77
|
+
.use(remarkInlineSvg)
|
|
78
|
+
.process({ value: markdown, path: _path });
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Now running `node example.js` yields:
|
|
82
|
+
|
|
83
|
+
```markdown
|
|
84
|
+
# Hello
|
|
85
|
+
|
|
86
|
+
This is a test markdown document.
|
|
87
|
+
|
|
88
|
+
<figure class="inline-svg">
|
|
89
|
+
<svg fill="none" viewBox="0 0 250 250" role="img" aria-hidden="true"><circle cx="125" cy="125" r="100" fill="#BA5B5B"/></svg>
|
|
90
|
+
</figure>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Options
|
|
94
|
+
|
|
95
|
+
| Key | type | Default value | Description |
|
|
96
|
+
| ------------------------- | --------------------- | ---------------------------------------- | ---------------------------------------------------------- |
|
|
97
|
+
| [`suffix`](#suffix) | `string` | `'.svg'` | The plugin only processes SVG files ending with this value |
|
|
98
|
+
| [`assetsDir`](#assetsdir) | `string \| undefined` | `undefined` | Base directory where SVG files are located |
|
|
99
|
+
| [`wrapper`](#wrapper) | `string` | `'<figure class="inline-svg"></figure>'` | HTML wrapper used to wrap the inlined SVG |
|
|
100
|
+
| [`svgo`](#svgo) | `boolean` | `true` | Enable or disable SVG optimization |
|
|
101
|
+
|
|
102
|
+
### `suffix`
|
|
103
|
+
|
|
104
|
+
Only image nodes whose URL ends with the specified suffix will be processed. Defaults to `'.svg'`.
|
|
105
|
+
|
|
106
|
+
### `assetsDir`
|
|
107
|
+
|
|
108
|
+
Base directory where SVG files are located. By default is `undefined` and it will resolve paths either in an absolute or relative manner.
|
|
109
|
+
|
|
110
|
+
### `wrapper`
|
|
111
|
+
|
|
112
|
+
Defines the HTML wrapper used around the inlined SVG.
|
|
113
|
+
|
|
114
|
+
- Set to an empty string `''` to disable wrapping entirely.
|
|
115
|
+
- Defaults to:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
<figure class="inline-svg"></figure>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### `svgo`
|
|
122
|
+
|
|
123
|
+
The SVG's are optimized by default. Disable it by setting it to `false`.
|
|
124
|
+
|
|
125
|
+
## SVGO configuration
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
{ plugins: ['preset-default', 'removeXMLNS'] }
|
|
129
|
+
```
|
package/package.json
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "remark-inline-svg-flex",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "Flexible Remark plugin that inlines and optimizes SVGs with SVGO, featuring customizable path resolution and wrappers.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"unified",
|
|
7
|
-
"rehype",
|
|
8
|
-
"plugin",
|
|
9
|
-
"rehype-plugin",
|
|
10
|
-
"inline",
|
|
11
|
-
"svg",
|
|
12
|
-
"image",
|
|
13
|
-
"img",
|
|
14
|
-
"html"
|
|
15
|
-
],
|
|
16
|
-
"homepage": "https://github.com/gass-git/remark-inline-svg-flex#readme",
|
|
17
|
-
"bugs": {
|
|
18
|
-
"url": "https://github.com/gass-git/remark-inline-svg-flex/issues"
|
|
19
|
-
},
|
|
20
|
-
"repository": {
|
|
21
|
-
"type": "git",
|
|
22
|
-
"url": "git+https://github.com/gass-git/remark-inline-svg-flex.git"
|
|
23
|
-
},
|
|
24
|
-
"license": "MIT",
|
|
25
|
-
"author": "gass-git",
|
|
26
|
-
"type": "module",
|
|
27
|
-
"main": "./dist/cjs/index.js",
|
|
28
|
-
"module": "./dist/index.js",
|
|
29
|
-
"types": "./dist/index.d.ts",
|
|
30
|
-
"exports": {
|
|
31
|
-
".": {
|
|
32
|
-
"import": "./dist/index.js",
|
|
33
|
-
"require": "./dist/cjs/index.js",
|
|
34
|
-
"types": "./dist/index.d.ts"
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"scripts": {
|
|
38
|
-
"build": "rimraf dist && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json",
|
|
39
|
-
"dev": "rimraf --glob \"*.tgz\" && npm run build && npm pack && npm link",
|
|
40
|
-
"tests": "vitest"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@types/mdast": "^4.0.4",
|
|
44
|
-
"@types/node": "^25.5.0",
|
|
45
|
-
"prettier": "^3.8.1",
|
|
46
|
-
"remark": "^15.0.1",
|
|
47
|
-
"remark-parse": "^11.0.0",
|
|
48
|
-
"rimraf": "^6.1.3",
|
|
49
|
-
"typescript": "^5.9.3",
|
|
50
|
-
"unified": "^11.0.5",
|
|
51
|
-
"vitest": "^4.1.0"
|
|
52
|
-
},
|
|
53
|
-
"dependencies": {
|
|
54
|
-
"svgo": "^4.0.1",
|
|
55
|
-
"unist-util-visit": "^5.1.0",
|
|
56
|
-
"vfile": "^6.0.3"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "remark-inline-svg-flex",
|
|
3
|
+
"version": "0.3.7",
|
|
4
|
+
"description": "Flexible Remark plugin that inlines and optimizes SVGs with SVGO, featuring customizable path resolution and wrappers.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"unified",
|
|
7
|
+
"rehype",
|
|
8
|
+
"plugin",
|
|
9
|
+
"rehype-plugin",
|
|
10
|
+
"inline",
|
|
11
|
+
"svg",
|
|
12
|
+
"image",
|
|
13
|
+
"img",
|
|
14
|
+
"html"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://github.com/gass-git/remark-inline-svg-flex#readme",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/gass-git/remark-inline-svg-flex/issues"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/gass-git/remark-inline-svg-flex.git"
|
|
23
|
+
},
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"author": "gass-git",
|
|
26
|
+
"type": "module",
|
|
27
|
+
"main": "./dist/cjs/index.js",
|
|
28
|
+
"module": "./dist/index.js",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"import": "./dist/index.js",
|
|
33
|
+
"require": "./dist/cjs/index.js",
|
|
34
|
+
"types": "./dist/index.d.ts"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "rimraf dist && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json",
|
|
39
|
+
"dev": "rimraf --glob \"*.tgz\" && npm run build && npm pack && npm link",
|
|
40
|
+
"tests": "vitest"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/mdast": "^4.0.4",
|
|
44
|
+
"@types/node": "^25.5.0",
|
|
45
|
+
"prettier": "^3.8.1",
|
|
46
|
+
"remark": "^15.0.1",
|
|
47
|
+
"remark-parse": "^11.0.0",
|
|
48
|
+
"rimraf": "^6.1.3",
|
|
49
|
+
"typescript": "^5.9.3",
|
|
50
|
+
"unified": "^11.0.5",
|
|
51
|
+
"vitest": "^4.1.0"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"svgo": "^4.0.1",
|
|
55
|
+
"unist-util-visit": "^5.1.0",
|
|
56
|
+
"vfile": "^6.0.3"
|
|
57
|
+
}
|
|
58
|
+
}
|