svger-cli 2.0.7 → 3.0.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/CHANGELOG.md +259 -9
- package/README.md +383 -13
- package/dist/index.d.ts +30 -0
- package/dist/index.js +33 -0
- package/dist/integrations/babel.d.ts +58 -0
- package/dist/integrations/babel.js +221 -0
- package/dist/integrations/jest-preset.d.ts +44 -0
- package/dist/integrations/jest-preset.js +169 -0
- package/dist/integrations/nextjs.d.ts +56 -0
- package/dist/integrations/nextjs.js +140 -0
- package/dist/integrations/rollup.d.ts +29 -0
- package/dist/integrations/rollup.js +197 -0
- package/dist/integrations/vite.d.ts +29 -0
- package/dist/integrations/vite.js +221 -0
- package/dist/integrations/webpack.d.ts +84 -0
- package/dist/integrations/webpack.js +273 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +2 -1
- package/dist/types/integrations.d.ts +255 -0
- package/dist/types/integrations.js +4 -0
- package/docs/INTEGRATION-IMPLEMENTATION-SUMMARY.md +448 -0
- package/docs/INTEGRATIONS.md +543 -0
- package/examples/babel.config.example.js +182 -0
- package/examples/jest.config.example.js +158 -0
- package/examples/next.config.example.js +133 -0
- package/examples/rollup.config.example.js +129 -0
- package/examples/vite.config.example.js +98 -0
- package/examples/webpack.config.example.js +88 -0
- package/package.json +75 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svger-cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Enterprise-grade, zero-dependency SVG to component converter
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Enterprise-grade, zero-dependency SVG to component converter with official Webpack, Vite, Rollup, Babel, Next.js & Jest integrations. Supporting React, React Native, Vue, Angular, Svelte, Solid, Lit, Preact & Vanilla. Features auto-generated TypeScript exports, HMR, responsive design, themes & 85% faster processing than SVGR.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
@@ -15,6 +15,56 @@
|
|
|
15
15
|
"import": "./dist/index.js",
|
|
16
16
|
"default": "./dist/index.js"
|
|
17
17
|
},
|
|
18
|
+
"./webpack": {
|
|
19
|
+
"types": "./dist/integrations/webpack.d.ts",
|
|
20
|
+
"import": "./dist/integrations/webpack.js",
|
|
21
|
+
"default": "./dist/integrations/webpack.js"
|
|
22
|
+
},
|
|
23
|
+
"./webpack-loader": {
|
|
24
|
+
"types": "./dist/integrations/webpack.d.ts",
|
|
25
|
+
"import": "./dist/integrations/webpack.js",
|
|
26
|
+
"default": "./dist/integrations/webpack.js"
|
|
27
|
+
},
|
|
28
|
+
"./vite": {
|
|
29
|
+
"types": "./dist/integrations/vite.d.ts",
|
|
30
|
+
"import": "./dist/integrations/vite.js",
|
|
31
|
+
"default": "./dist/integrations/vite.js"
|
|
32
|
+
},
|
|
33
|
+
"./rollup": {
|
|
34
|
+
"types": "./dist/integrations/rollup.d.ts",
|
|
35
|
+
"import": "./dist/integrations/rollup.js",
|
|
36
|
+
"default": "./dist/integrations/rollup.js"
|
|
37
|
+
},
|
|
38
|
+
"./babel": {
|
|
39
|
+
"types": "./dist/integrations/babel.d.ts",
|
|
40
|
+
"import": "./dist/integrations/babel.js",
|
|
41
|
+
"default": "./dist/integrations/babel.js"
|
|
42
|
+
},
|
|
43
|
+
"./babel-plugin": {
|
|
44
|
+
"types": "./dist/integrations/babel.d.ts",
|
|
45
|
+
"import": "./dist/integrations/babel.js",
|
|
46
|
+
"default": "./dist/integrations/babel.js"
|
|
47
|
+
},
|
|
48
|
+
"./nextjs": {
|
|
49
|
+
"types": "./dist/integrations/nextjs.d.ts",
|
|
50
|
+
"import": "./dist/integrations/nextjs.js",
|
|
51
|
+
"default": "./dist/integrations/nextjs.js"
|
|
52
|
+
},
|
|
53
|
+
"./jest": {
|
|
54
|
+
"types": "./dist/integrations/jest-preset.d.ts",
|
|
55
|
+
"import": "./dist/integrations/jest-preset.js",
|
|
56
|
+
"default": "./dist/integrations/jest-preset.js"
|
|
57
|
+
},
|
|
58
|
+
"./jest-transformer": {
|
|
59
|
+
"types": "./dist/integrations/jest-preset.d.ts",
|
|
60
|
+
"import": "./dist/integrations/jest-preset.js",
|
|
61
|
+
"default": "./dist/integrations/jest-preset.js"
|
|
62
|
+
},
|
|
63
|
+
"./jest-preset": {
|
|
64
|
+
"types": "./dist/integrations/jest-preset.d.ts",
|
|
65
|
+
"import": "./dist/integrations/jest-preset.js",
|
|
66
|
+
"default": "./dist/integrations/jest-preset.js"
|
|
67
|
+
},
|
|
18
68
|
"./package.json": "./package.json"
|
|
19
69
|
},
|
|
20
70
|
"files": [
|
|
@@ -27,6 +77,7 @@
|
|
|
27
77
|
"SECURITY.md",
|
|
28
78
|
"DEVELOPMENT.md",
|
|
29
79
|
"docs/**/*.md",
|
|
80
|
+
"examples/**/*.js",
|
|
30
81
|
".svgerconfig.example.json"
|
|
31
82
|
],
|
|
32
83
|
"scripts": {
|
|
@@ -34,10 +85,11 @@
|
|
|
34
85
|
"build:watch": "tsc -p tsconfig.json --watch",
|
|
35
86
|
"clean": "node -e \"require('fs').rmSync('dist', {recursive: true, force: true})\"",
|
|
36
87
|
"dev": "ts-node --esm src/cli.ts",
|
|
37
|
-
"test": "npm run test:frameworks && npm run test:config && npm run test:e2e",
|
|
88
|
+
"test": "npm run test:frameworks && npm run test:config && npm run test:e2e && npm run test:integrations",
|
|
38
89
|
"test:frameworks": "node frameworks.test.js",
|
|
39
90
|
"test:config": "tsc tests/config-options.test.ts --outDir dist-tests --module es2022 --target es2022 --moduleResolution bundler && node dist-tests/config-options.test.js",
|
|
40
91
|
"test:e2e": "tsc tests/e2e-complete.test.ts --outDir dist-tests --module es2022 --target es2022 --moduleResolution bundler && node dist-tests/e2e-complete.test.js",
|
|
92
|
+
"test:integrations": "node tests/integrations/verify-integrations.mjs",
|
|
41
93
|
"test:watch": "jest --watch",
|
|
42
94
|
"test:coverage": "jest --coverage",
|
|
43
95
|
"test:integration": "jest --testPathPattern=integration",
|
|
@@ -76,6 +128,25 @@
|
|
|
76
128
|
"batch-processing",
|
|
77
129
|
"icon-generation",
|
|
78
130
|
"frontend-tooling",
|
|
131
|
+
"webpack",
|
|
132
|
+
"webpack-plugin",
|
|
133
|
+
"webpack-loader",
|
|
134
|
+
"vite",
|
|
135
|
+
"vite-plugin",
|
|
136
|
+
"rollup",
|
|
137
|
+
"rollup-plugin",
|
|
138
|
+
"babel",
|
|
139
|
+
"babel-plugin",
|
|
140
|
+
"babel-transform",
|
|
141
|
+
"nextjs",
|
|
142
|
+
"next-js",
|
|
143
|
+
"jest",
|
|
144
|
+
"jest-preset",
|
|
145
|
+
"jest-transformer",
|
|
146
|
+
"build-tools",
|
|
147
|
+
"bundler",
|
|
148
|
+
"hmr",
|
|
149
|
+
"hot-module-replacement",
|
|
79
150
|
"web-components",
|
|
80
151
|
"component-library",
|
|
81
152
|
"svg-optimization",
|
|
@@ -131,10 +202,9 @@
|
|
|
131
202
|
}
|
|
132
203
|
],
|
|
133
204
|
"license": "MIT",
|
|
134
|
-
"dependencies": {},
|
|
135
205
|
"devDependencies": {
|
|
136
206
|
"@types/jest": "^29.5.12",
|
|
137
|
-
"@types/node": "^24.
|
|
207
|
+
"@types/node": "^24.10.1",
|
|
138
208
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
139
209
|
"@typescript-eslint/parser": "^7.18.0",
|
|
140
210
|
"eslint": "^8.57.1",
|