@unocss/cli 0.58.6 → 0.58.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/cli.mjs CHANGED
@@ -2,7 +2,7 @@ import process from 'node:process';
2
2
  import { cac } from 'cac';
3
3
  import { loadConfig } from '@unocss/config';
4
4
  import { toArray } from '@unocss/core';
5
- import { b as build, v as version, h as handleError } from './shared/cli.CT3F3BZ8.mjs';
5
+ import { b as build, v as version, h as handleError } from './shared/cli.BzH2k4HP.mjs';
6
6
  import 'node:fs';
7
7
  import 'pathe';
8
8
  import 'fast-glob';
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import 'consola';
6
6
  import 'colorette';
7
7
  import 'perfect-debounce';
8
8
  import '@unocss/core';
9
- export { b as build, r as resolveOptions } from './shared/cli.CT3F3BZ8.mjs';
9
+ export { b as build, r as resolveOptions } from './shared/cli.BzH2k4HP.mjs';
10
10
  import '@rollup/pluginutils';
11
11
  import '@unocss/config';
12
12
  import 'magic-string';
@@ -190,7 +190,10 @@ async function applyTransformers(ctx, original, id, enforce = "default") {
190
190
  ctx.affectedModules.add(id);
191
191
  return {
192
192
  code,
193
- map: remapping(maps, () => null)
193
+ map: remapping(maps, (_, ctx2) => {
194
+ ctx2.content = code;
195
+ return null;
196
+ })
194
197
  };
195
198
  }
196
199
  }
@@ -211,7 +214,7 @@ function restoreSkipCode(code, map) {
211
214
  return code;
212
215
  }
213
216
 
214
- const version = "0.58.6";
217
+ const version = "0.58.8";
215
218
 
216
219
  const defaultConfig = {
217
220
  envMode: "build",
@@ -303,6 +306,8 @@ async function build(_options) {
303
306
  const absolutePath = resolve(cwd, file);
304
307
  if (configSources.includes(absolutePath)) {
305
308
  await ctx.reloadConfig();
309
+ if (configSources.length)
310
+ watcher.add(configSources);
306
311
  consola.info(`${cyan(basename(file))} changed, setting new config`);
307
312
  } else {
308
313
  consola.log(`${green(type)} ${dim(file)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/cli",
3
- "version": "0.58.6",
3
+ "version": "0.58.8",
4
4
  "description": "CLI for UnoCSS",
5
5
  "author": {
6
6
  "name": "Johann Schopplich",
@@ -49,9 +49,9 @@
49
49
  "magic-string": "^0.30.8",
50
50
  "pathe": "^1.1.2",
51
51
  "perfect-debounce": "^1.0.0",
52
- "@unocss/config": "0.58.6",
53
- "@unocss/core": "0.58.6",
54
- "@unocss/preset-uno": "0.58.6"
52
+ "@unocss/config": "0.58.8",
53
+ "@unocss/core": "0.58.8",
54
+ "@unocss/preset-uno": "0.58.8"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "unbuild",