esm-styles 0.1.6 → 0.1.8

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/lib/build.js CHANGED
@@ -175,7 +175,7 @@ export async function build(configPath = 'esm-styles.config.js') {
175
175
  .map((f) => f.layer)
176
176
  .join(', ');
177
177
  const layerImports = layerFiles.map((f) => `@import '${f}';`).join('\n');
178
- const mainCss = [varImports, layerNames ? `@layer ${layerNames};` : '', layerImports]
178
+ const mainCss = [layerNames ? `@layer ${layerNames};` : '', layerImports, varImports]
179
179
  .filter(Boolean)
180
180
  .join('\n') + '\n';
181
181
  await fs.writeFile(mainCssPath, mainCss, 'utf8');
package/dist/watch.js CHANGED
@@ -14,6 +14,11 @@ const config = configModule.default
14
14
  const basePath = path.resolve(process.cwd(), config.basePath || '.')
15
15
  const sourcePath = path.join(basePath, config.sourcePath || '')
16
16
 
17
+ const buildJsPath = path.resolve(
18
+ path.dirname(new URL(import.meta.url).pathname),
19
+ 'build.js'
20
+ )
21
+
17
22
  const nodemonArgs = [
18
23
  '--watch',
19
24
  sourcePath,
@@ -22,7 +27,7 @@ const nodemonArgs = [
22
27
  '--ignore',
23
28
  path.join(sourcePath, '$*.mjs'),
24
29
  '--exec',
25
- `node dist/build.js ${configPath}`,
30
+ `node ${buildJsPath} ${configPath}`,
26
31
  ]
27
32
 
28
33
  console.log('[esm-styles] Running:', 'nodemon', ...nodemonArgs)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esm-styles",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "A library for working with ESM styles",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",