css-typed-vars 0.4.5 → 0.4.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/dist/{chunk-SWVHEM3S.js → chunk-PYNEJIVI.js} +2 -2
- package/dist/cli.cjs +4 -1
- package/dist/cli.js +4 -1
- package/dist/esbuild.cjs +2 -2
- package/dist/esbuild.js +1 -1
- package/dist/rollup.cjs +2 -2
- package/dist/rollup.js +1 -1
- package/dist/unplugin.cjs +2 -2
- package/dist/unplugin.js +1 -1
- package/dist/vite.cjs +2 -2
- package/dist/vite.js +1 -1
- package/dist/webpack.cjs +2 -2
- package/dist/webpack.js +1 -1
- package/package.json +1 -1
|
@@ -24,8 +24,8 @@ var unplugin_default = createUnplugin((options) => {
|
|
|
24
24
|
configureServer(server) {
|
|
25
25
|
const handle = async (file) => {
|
|
26
26
|
if (!/\.(css|scss|less)$/i.test(file)) return;
|
|
27
|
-
cachedNames =
|
|
28
|
-
const names = await
|
|
27
|
+
cachedNames = scanVarNames(options.input, options.exclude, options.selectors);
|
|
28
|
+
const names = await cachedNames;
|
|
29
29
|
const dtsPath = getDtsPath(options);
|
|
30
30
|
if (dtsPath) {
|
|
31
31
|
await writeFile(dtsPath, generateDeclaration(names, options.prefix, options.naming), "utf8");
|
package/dist/cli.cjs
CHANGED
|
@@ -183,7 +183,10 @@ async function loadConfig() {
|
|
|
183
183
|
const mod = await import((0, import_node_url.pathToFileURL)(path).href);
|
|
184
184
|
return mod.default;
|
|
185
185
|
}
|
|
186
|
-
} catch {
|
|
186
|
+
} catch (err) {
|
|
187
|
+
const code = err.code;
|
|
188
|
+
if (code === "ENOENT" || code === "ERR_MODULE_NOT_FOUND" || code === "MODULE_NOT_FOUND") continue;
|
|
189
|
+
console.warn(`css-typed-vars: failed to load config "${file}": ${err.message}`);
|
|
187
190
|
}
|
|
188
191
|
}
|
|
189
192
|
return {};
|
package/dist/cli.js
CHANGED
|
@@ -38,7 +38,10 @@ async function loadConfig() {
|
|
|
38
38
|
const mod = await import(pathToFileURL(path).href);
|
|
39
39
|
return mod.default;
|
|
40
40
|
}
|
|
41
|
-
} catch {
|
|
41
|
+
} catch (err) {
|
|
42
|
+
const code = err.code;
|
|
43
|
+
if (code === "ENOENT" || code === "ERR_MODULE_NOT_FOUND" || code === "MODULE_NOT_FOUND") continue;
|
|
44
|
+
console.warn(`css-typed-vars: failed to load config "${file}": ${err.message}`);
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
47
|
return {};
|
package/dist/esbuild.cjs
CHANGED
|
@@ -139,8 +139,8 @@ var unplugin_default = (0, import_unplugin.createUnplugin)((options) => {
|
|
|
139
139
|
configureServer(server) {
|
|
140
140
|
const handle = async (file) => {
|
|
141
141
|
if (!/\.(css|scss|less)$/i.test(file)) return;
|
|
142
|
-
cachedNames =
|
|
143
|
-
const names = await
|
|
142
|
+
cachedNames = scanVarNames(options.input, options.exclude, options.selectors);
|
|
143
|
+
const names = await cachedNames;
|
|
144
144
|
const dtsPath = getDtsPath(options);
|
|
145
145
|
if (dtsPath) {
|
|
146
146
|
await (0, import_promises2.writeFile)(dtsPath, generateDeclaration(names, options.prefix, options.naming), "utf8");
|
package/dist/esbuild.js
CHANGED
package/dist/rollup.cjs
CHANGED
|
@@ -139,8 +139,8 @@ var unplugin_default = (0, import_unplugin.createUnplugin)((options) => {
|
|
|
139
139
|
configureServer(server) {
|
|
140
140
|
const handle = async (file) => {
|
|
141
141
|
if (!/\.(css|scss|less)$/i.test(file)) return;
|
|
142
|
-
cachedNames =
|
|
143
|
-
const names = await
|
|
142
|
+
cachedNames = scanVarNames(options.input, options.exclude, options.selectors);
|
|
143
|
+
const names = await cachedNames;
|
|
144
144
|
const dtsPath = getDtsPath(options);
|
|
145
145
|
if (dtsPath) {
|
|
146
146
|
await (0, import_promises2.writeFile)(dtsPath, generateDeclaration(names, options.prefix, options.naming), "utf8");
|
package/dist/rollup.js
CHANGED
package/dist/unplugin.cjs
CHANGED
|
@@ -137,8 +137,8 @@ var unplugin_default = (0, import_unplugin.createUnplugin)((options) => {
|
|
|
137
137
|
configureServer(server) {
|
|
138
138
|
const handle = async (file) => {
|
|
139
139
|
if (!/\.(css|scss|less)$/i.test(file)) return;
|
|
140
|
-
cachedNames =
|
|
141
|
-
const names = await
|
|
140
|
+
cachedNames = scanVarNames(options.input, options.exclude, options.selectors);
|
|
141
|
+
const names = await cachedNames;
|
|
142
142
|
const dtsPath = getDtsPath(options);
|
|
143
143
|
if (dtsPath) {
|
|
144
144
|
await (0, import_promises2.writeFile)(dtsPath, generateDeclaration(names, options.prefix, options.naming), "utf8");
|
package/dist/unplugin.js
CHANGED
package/dist/vite.cjs
CHANGED
|
@@ -139,8 +139,8 @@ var unplugin_default = (0, import_unplugin.createUnplugin)((options) => {
|
|
|
139
139
|
configureServer(server) {
|
|
140
140
|
const handle = async (file) => {
|
|
141
141
|
if (!/\.(css|scss|less)$/i.test(file)) return;
|
|
142
|
-
cachedNames =
|
|
143
|
-
const names = await
|
|
142
|
+
cachedNames = scanVarNames(options.input, options.exclude, options.selectors);
|
|
143
|
+
const names = await cachedNames;
|
|
144
144
|
const dtsPath = getDtsPath(options);
|
|
145
145
|
if (dtsPath) {
|
|
146
146
|
await (0, import_promises2.writeFile)(dtsPath, generateDeclaration(names, options.prefix, options.naming), "utf8");
|
package/dist/vite.js
CHANGED
package/dist/webpack.cjs
CHANGED
|
@@ -139,8 +139,8 @@ var unplugin_default = (0, import_unplugin.createUnplugin)((options) => {
|
|
|
139
139
|
configureServer(server) {
|
|
140
140
|
const handle = async (file) => {
|
|
141
141
|
if (!/\.(css|scss|less)$/i.test(file)) return;
|
|
142
|
-
cachedNames =
|
|
143
|
-
const names = await
|
|
142
|
+
cachedNames = scanVarNames(options.input, options.exclude, options.selectors);
|
|
143
|
+
const names = await cachedNames;
|
|
144
144
|
const dtsPath = getDtsPath(options);
|
|
145
145
|
if (dtsPath) {
|
|
146
146
|
await (0, import_promises2.writeFile)(dtsPath, generateDeclaration(names, options.prefix, options.naming), "utf8");
|
package/dist/webpack.js
CHANGED