@lls/vitescripts 24.0.1-23f98096a → 24.0.1-38fa74384
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/package.json +1 -1
- package/src/llsSideRefreshMetaPlugin.mjs +20 -10
package/package.json
CHANGED
|
@@ -7,18 +7,28 @@ const pwd = toLocal('../')
|
|
|
7
7
|
|
|
8
8
|
// sideRefreshActiveModules is of the form ['viewer', 'superkit', ...] with 'viewer' if repo launched
|
|
9
9
|
// WITH_VIEWER=1 npm start
|
|
10
|
-
export const makeSideRefreshThemeInterceptor = async (sideRefreshActiveModules) => {
|
|
10
|
+
export const makeSideRefreshThemeInterceptor = async (sideRefreshActiveModules = []) => {
|
|
11
|
+
const isMonorepo = path.basename(searchForWorkspaceRoot(pwd)) !== 'vitescripts'
|
|
11
12
|
const parentDir = path.basename(path.dirname(pwd))
|
|
12
13
|
const sideRefreshThemes = {}
|
|
13
|
-
const cssThemeMap =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
const cssThemeMap = isMonorepo
|
|
15
|
+
? {
|
|
16
|
+
viewer: path.join(pwd, '../viewer/src/utils/css-bare.mjs'),
|
|
17
|
+
// kit: no themes for kit
|
|
18
|
+
superkit: path.join(pwd, '../superkit/src/internals/utils/css-bare.mjs'),
|
|
19
|
+
core: path.join(pwd, '../core/src/utils/css-bare.mjs'),
|
|
20
|
+
audio: path.join(pwd, '../lls-audio/src/utils/css-bare.mjs'),
|
|
21
|
+
code: path.join(pwd, '../lls-code/src/utils/css-bare.mjs')
|
|
22
|
+
}
|
|
23
|
+
: {
|
|
24
|
+
viewer: '@lls/viewer/lib/css-bare.mjs',
|
|
25
|
+
// kit: no themes for kit
|
|
26
|
+
superkit: '@lls/superkit/lib/css-bare.mjs',
|
|
27
|
+
core: '@lls/core/lib/css-bare.mjs',
|
|
28
|
+
audio: '@lls/lls-audio/lib/css-bare.mjs',
|
|
29
|
+
code: '@lls/lls-code/lib/css-bare.mjs'
|
|
30
|
+
}
|
|
31
|
+
await Promise.all((isMonorepo ? Object.keys(cssThemeMap) : sideRefreshActiveModules).map(sideRefreshName => {
|
|
22
32
|
if (!cssThemeMap[sideRefreshName]) {
|
|
23
33
|
throw new Error('invalid side refresh name' + sideRefreshName)
|
|
24
34
|
}
|