svelte-ag 1.0.42 → 1.0.43
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-plugin-component-source-collector.d.ts","sourceRoot":"","sources":["../../../src/lib/vite/vite-plugin-component-source-collector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,MAAM,CAAC;AAMnD,UAAU,OAAO;IACf;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;
|
|
1
|
+
{"version":3,"file":"vite-plugin-component-source-collector.d.ts","sourceRoot":"","sources":["../../../src/lib/vite/vite-plugin-component-source-collector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,MAAM,CAAC;AAMnD,UAAU,OAAO;IACf;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAWD,wBAA8B,wBAAwB,CAAC,IAAI,GAAE,OAA8B,GAAG,OAAO,CAAC,MAAM,CAAC,CAqK5G"}
|
|
@@ -4,6 +4,7 @@ import { resolve, join, relative, dirname } from 'path';
|
|
|
4
4
|
import { open } from 'fs/promises';
|
|
5
5
|
/** All unique component directories */
|
|
6
6
|
const componentFiles = new Set();
|
|
7
|
+
let firstRound = true;
|
|
7
8
|
function ensureDotRelative(filePath) {
|
|
8
9
|
if (filePath.startsWith('.'))
|
|
9
10
|
return filePath;
|
|
@@ -18,7 +19,6 @@ export default async function componentSourceCollector(opts = { safePackages: []
|
|
|
18
19
|
let root = undefined;
|
|
19
20
|
// state
|
|
20
21
|
let config;
|
|
21
|
-
let firstRound = true;
|
|
22
22
|
let initialTransformDone = false;
|
|
23
23
|
let initialTransformTimer = null;
|
|
24
24
|
// init
|
|
@@ -74,8 +74,10 @@ export default async function componentSourceCollector(opts = { safePackages: []
|
|
|
74
74
|
config = resolved;
|
|
75
75
|
root = config.root;
|
|
76
76
|
outputFilePath = resolve(root, outFileName);
|
|
77
|
+
console.log('tailwind-sources:configResolved: Command is', config.command);
|
|
77
78
|
await touch(outputFilePath);
|
|
78
79
|
if (config.command === 'build' && firstRound) {
|
|
80
|
+
console.log('tailwind-sources: Clearing files list');
|
|
79
81
|
componentFiles.clear();
|
|
80
82
|
firstRound = false;
|
|
81
83
|
}
|
|
@@ -86,7 +88,6 @@ export default async function componentSourceCollector(opts = { safePackages: []
|
|
|
86
88
|
// console.log('config resolved', componentFiles);
|
|
87
89
|
}
|
|
88
90
|
}
|
|
89
|
-
console.log('tailwind-sources:configResolved:command', config.command);
|
|
90
91
|
},
|
|
91
92
|
/**
|
|
92
93
|
* Reset list on lock file changed
|
package/package.json
CHANGED
|
@@ -23,6 +23,7 @@ interface Options {
|
|
|
23
23
|
|
|
24
24
|
/** All unique component directories */
|
|
25
25
|
const componentFiles = new Set<string>();
|
|
26
|
+
let firstRound = true;
|
|
26
27
|
|
|
27
28
|
function ensureDotRelative(filePath: string): string {
|
|
28
29
|
if (filePath.startsWith('.')) return filePath;
|
|
@@ -40,7 +41,6 @@ export default async function componentSourceCollector(opts: Options = { safePac
|
|
|
40
41
|
|
|
41
42
|
// state
|
|
42
43
|
let config: ResolvedConfig;
|
|
43
|
-
let firstRound = true;
|
|
44
44
|
let initialTransformDone = false;
|
|
45
45
|
let initialTransformTimer: NodeJS.Timeout | null = null;
|
|
46
46
|
|
|
@@ -107,9 +107,12 @@ export default async function componentSourceCollector(opts: Options = { safePac
|
|
|
107
107
|
root = config.root;
|
|
108
108
|
outputFilePath = resolve(root, outFileName);
|
|
109
109
|
|
|
110
|
+
console.log('tailwind-sources:configResolved: Command is', config.command);
|
|
111
|
+
|
|
110
112
|
await touch(outputFilePath);
|
|
111
113
|
|
|
112
114
|
if (config.command === 'build' && firstRound) {
|
|
115
|
+
console.log('tailwind-sources: Clearing files list');
|
|
113
116
|
componentFiles.clear();
|
|
114
117
|
firstRound = false;
|
|
115
118
|
} else if (config.command === 'serve') {
|
|
@@ -119,7 +122,6 @@ export default async function componentSourceCollector(opts: Options = { safePac
|
|
|
119
122
|
// console.log('config resolved', componentFiles);
|
|
120
123
|
}
|
|
121
124
|
}
|
|
122
|
-
console.log('tailwind-sources:configResolved:command', config.command);
|
|
123
125
|
},
|
|
124
126
|
|
|
125
127
|
/**
|