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.
@@ -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 = null;
28
- const names = await scanVarNames(options.input, options.exclude, options.selectors);
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 = null;
143
- const names = await scanVarNames(options.input, options.exclude, options.selectors);
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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-SWVHEM3S.js";
3
+ } from "./chunk-PYNEJIVI.js";
4
4
  import "./chunk-J7ZV6AUQ.js";
5
5
 
6
6
  // src/esbuild.ts
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 = null;
143
- const names = await scanVarNames(options.input, options.exclude, options.selectors);
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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-SWVHEM3S.js";
3
+ } from "./chunk-PYNEJIVI.js";
4
4
  import "./chunk-J7ZV6AUQ.js";
5
5
 
6
6
  // src/rollup.ts
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 = null;
141
- const names = await scanVarNames(options.input, options.exclude, options.selectors);
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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-SWVHEM3S.js";
3
+ } from "./chunk-PYNEJIVI.js";
4
4
  import "./chunk-J7ZV6AUQ.js";
5
5
  export {
6
6
  unplugin_default as default
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 = null;
143
- const names = await scanVarNames(options.input, options.exclude, options.selectors);
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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-SWVHEM3S.js";
3
+ } from "./chunk-PYNEJIVI.js";
4
4
  import "./chunk-J7ZV6AUQ.js";
5
5
 
6
6
  // src/vite.ts
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 = null;
143
- const names = await scanVarNames(options.input, options.exclude, options.selectors);
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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-SWVHEM3S.js";
3
+ } from "./chunk-PYNEJIVI.js";
4
4
  import "./chunk-J7ZV6AUQ.js";
5
5
 
6
6
  // src/webpack.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "css-typed-vars",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "Generate TypeScript typed constants from CSS custom properties",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",