@salty-css/vite 0.0.1-alpha.305 → 0.0.1-alpha.307
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/index.cjs +1 -1
- package/index.js +22 -18
- package/package.json +2 -2
package/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("@salty-css/core/compiler"),o=require("@salty-css/core/compiler/as-class"),l=require("@salty-css/core/server"),r=i=>{const s=new o.SaltyCompiler(i);return{name:"stylegen",buildStart:async()=>await s.generateCss(),load:async e=>{if(a.isSaltyFile(e))return await s.minimizeFile(e)},handleHotUpdate:async({file:e,server:t})=>{await l.checkShouldRestart(e)&&t.restart()},watchChange:{handler:async(e,t)=>{a.isSaltyFile(e)&&t.event!=="delete"&&(await l.checkShouldRestart(e)||await s.generateFile(e))}}}};exports.default=r;exports.saltyPlugin=r;
|
package/index.js
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isSaltyFile as s } from "@salty-css/core/compiler";
|
|
2
|
+
import { SaltyCompiler as n } from "@salty-css/core/compiler/as-class";
|
|
2
3
|
import { checkShouldRestart as l } from "@salty-css/core/server";
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
const m = (r) => {
|
|
5
|
+
const a = new n(r);
|
|
6
|
+
return {
|
|
7
|
+
name: "stylegen",
|
|
8
|
+
buildStart: async () => await a.generateCss(),
|
|
9
|
+
load: async (t) => {
|
|
10
|
+
if (s(t))
|
|
11
|
+
return await a.minimizeFile(t);
|
|
12
|
+
},
|
|
13
|
+
handleHotUpdate: async ({ file: t, server: e }) => {
|
|
14
|
+
await l(t) && e.restart();
|
|
15
|
+
},
|
|
16
|
+
watchChange: {
|
|
17
|
+
handler: async (t, e) => {
|
|
18
|
+
s(t) && e.event !== "delete" && (await l(t) || await a.generateFile(t));
|
|
19
|
+
}
|
|
16
20
|
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
21
|
+
};
|
|
22
|
+
};
|
|
19
23
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
m as default,
|
|
25
|
+
m as saltyPlugin
|
|
22
26
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salty-css/vite",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.307",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"typings": "./dist/index.d.ts",
|
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@salty-css/core": "^0.0.1-alpha.
|
|
37
|
+
"@salty-css/core": "^0.0.1-alpha.307"
|
|
38
38
|
}
|
|
39
39
|
}
|