vite-plugin-material-symbols 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/CHANGELOG.md +4 -0
- package/dist/index.js +1 -1
- package/package.json +8 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import esquery from "esquery";const plugin=({placeholder:d="__MATERIAL_SYMBOLS__",component:e="Icon"}={})=>{const f=new Set();return {name:"material-symbols",enforce:"pre",moduleParsed:function({id:g,ast:h}){if(!h)return;const i=esquery.query(h,`CallExpression[callee.name='jsx'][arguments.0.name='${e}'] > .arguments > Property[key.name='children'] Literal`);
|
|
1
|
+
import esquery from "esquery";const plugin=({placeholder:d="__MATERIAL_SYMBOLS__",component:e="Icon"}={})=>{const f=new Set();return {name:"material-symbols",enforce:"pre",moduleParsed:function({id:g,ast:h}){if(!h)return;const i=esquery.query(h,`CallExpression[callee.name='jsx'][arguments.0.name='${e}'] > .arguments > Property[key.name='children'] Literal`);for(const {value:j}of i)if(typeof j==="string")this.debug({id:g,message:j}),f.add(j)},transformIndexHtml:(g)=>g.replace(d,f.size?`icon_names=${Array.from(f.values()).toSorted().join(",")}`:"")}};var src_default=plugin;export {src_default as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-material-symbols",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Selective loading of Material Symbols for production",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"build": "tsdown",
|
|
17
17
|
"postbuild": "attw --pack --profile esm-only",
|
|
18
18
|
"mdfix": "bunx --bun prettier *.md --write",
|
|
19
|
+
"version": "bun run version.ts",
|
|
19
20
|
"prepublishOnly": "bun lint && bun test && bun run build"
|
|
20
21
|
},
|
|
21
22
|
"exports": {
|
|
@@ -24,7 +25,10 @@
|
|
|
24
25
|
"default": "./dist/index.js"
|
|
25
26
|
}
|
|
26
27
|
},
|
|
27
|
-
"files": [
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"*.md"
|
|
31
|
+
],
|
|
28
32
|
"peerDependencies": {
|
|
29
33
|
"vite": "^6.0.0"
|
|
30
34
|
},
|
|
@@ -39,9 +43,11 @@
|
|
|
39
43
|
"@types/esquery": "^1.5.4",
|
|
40
44
|
"@types/react": "^18.3.12",
|
|
41
45
|
"@types/react-dom": "^18.3.1",
|
|
46
|
+
"@types/semver": "^7.5.8",
|
|
42
47
|
"@vitejs/plugin-react-swc": "^3.7.2",
|
|
43
48
|
"react": "^18.3.1",
|
|
44
49
|
"react-dom": "^18.3.1",
|
|
50
|
+
"semver": "^7.6.3",
|
|
45
51
|
"tsdown": "^0.3.1",
|
|
46
52
|
"typescript": "^5.7.2"
|
|
47
53
|
}
|