@plumeria/compiler 19.2.11 → 19.2.12
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/index.js +23 -43
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -244,7 +244,7 @@ function compileCSS(options) {
|
|
|
244
244
|
exclude: exclude,
|
|
245
245
|
sort: true,
|
|
246
246
|
});
|
|
247
|
-
const scannedTables = (0, utils_1.
|
|
247
|
+
const scannedTables = (0, utils_1.scanOverlay)(cwd);
|
|
248
248
|
const processFile = (filePath) => {
|
|
249
249
|
const resourcePath = path.resolve(cwd, filePath);
|
|
250
250
|
const source = fs.readFileSync(resourcePath, 'utf-8');
|
|
@@ -339,72 +339,52 @@ function compileCSS(options) {
|
|
|
339
339
|
}
|
|
340
340
|
},
|
|
341
341
|
});
|
|
342
|
-
const mergedStaticTable =
|
|
343
|
-
for (const key of Object.keys(scannedTables.staticTable)) {
|
|
344
|
-
mergedStaticTable[key] = scannedTables.staticTable[key];
|
|
345
|
-
}
|
|
342
|
+
const mergedStaticTable = Object.create(scannedTables.staticTable);
|
|
346
343
|
for (const key of Object.keys(localConsts)) {
|
|
347
344
|
mergedStaticTable[key] = localConsts[key];
|
|
348
345
|
}
|
|
349
346
|
for (const key of Object.keys(importMap)) {
|
|
350
347
|
mergedStaticTable[key] = importMap[key];
|
|
351
348
|
}
|
|
352
|
-
const mergedKeyframesTable =
|
|
353
|
-
for (const key of
|
|
354
|
-
mergedKeyframesTable[key] =
|
|
355
|
-
|
|
356
|
-
const varName = key.slice(resourcePath.length + 1);
|
|
357
|
-
mergedKeyframesTable[varName] = scannedTables.keyframesHashTable[key];
|
|
358
|
-
}
|
|
349
|
+
const mergedKeyframesTable = Object.create(scannedTables.keyframesHashTable);
|
|
350
|
+
for (const key of (0, utils_1.fileTableKeys)(resourcePath, 'keyframesHashTable') ?? []) {
|
|
351
|
+
mergedKeyframesTable[key.slice(resourcePath.length + 1)] =
|
|
352
|
+
scannedTables.keyframesHashTable[key];
|
|
359
353
|
}
|
|
360
354
|
for (const key of Object.keys(keyframesImportMap)) {
|
|
361
355
|
mergedKeyframesTable[key] = keyframesImportMap[key];
|
|
362
356
|
}
|
|
363
|
-
const mergedViewTransitionTable =
|
|
364
|
-
for (const key of
|
|
365
|
-
|
|
357
|
+
const mergedViewTransitionTable = Object.create(scannedTables.viewTransitionHashTable);
|
|
358
|
+
for (const key of (0, utils_1.fileTableKeys)(resourcePath, 'viewTransitionHashTable') ??
|
|
359
|
+
[]) {
|
|
360
|
+
mergedViewTransitionTable[key.slice(resourcePath.length + 1)] =
|
|
366
361
|
scannedTables.viewTransitionHashTable[key];
|
|
367
|
-
if (key.startsWith(`${resourcePath}-`)) {
|
|
368
|
-
const varName = key.slice(resourcePath.length + 1);
|
|
369
|
-
mergedViewTransitionTable[varName] =
|
|
370
|
-
scannedTables.viewTransitionHashTable[key];
|
|
371
|
-
}
|
|
372
362
|
}
|
|
373
363
|
for (const key of Object.keys(viewTransitionImportMap)) {
|
|
374
364
|
mergedViewTransitionTable[key] = viewTransitionImportMap[key];
|
|
375
365
|
}
|
|
376
|
-
const mergedCreateThemeHashTable =
|
|
377
|
-
for (const key of
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
mergedCreateThemeHashTable[varName] =
|
|
382
|
-
scannedTables.createThemeHashTable[key];
|
|
383
|
-
}
|
|
366
|
+
const mergedCreateThemeHashTable = Object.create(scannedTables.createThemeHashTable);
|
|
367
|
+
for (const key of (0, utils_1.fileTableKeys)(resourcePath, 'createThemeHashTable') ??
|
|
368
|
+
[]) {
|
|
369
|
+
mergedCreateThemeHashTable[key.slice(resourcePath.length + 1)] =
|
|
370
|
+
scannedTables.createThemeHashTable[key];
|
|
384
371
|
}
|
|
385
372
|
for (const key of Object.keys(createThemeImportMap)) {
|
|
386
373
|
mergedCreateThemeHashTable[key] = createThemeImportMap[key];
|
|
387
374
|
}
|
|
388
|
-
const mergedCreateStaticHashTable =
|
|
389
|
-
for (const key of
|
|
390
|
-
|
|
375
|
+
const mergedCreateStaticHashTable = Object.create(scannedTables.createStaticHashTable);
|
|
376
|
+
for (const key of (0, utils_1.fileTableKeys)(resourcePath, 'createStaticHashTable') ??
|
|
377
|
+
[]) {
|
|
378
|
+
mergedCreateStaticHashTable[key.slice(resourcePath.length + 1)] =
|
|
391
379
|
scannedTables.createStaticHashTable[key];
|
|
392
|
-
if (key.startsWith(`${resourcePath}-`)) {
|
|
393
|
-
const varName = key.slice(resourcePath.length + 1);
|
|
394
|
-
mergedCreateStaticHashTable[varName] =
|
|
395
|
-
scannedTables.createStaticHashTable[key];
|
|
396
|
-
}
|
|
397
380
|
}
|
|
398
381
|
for (const key of Object.keys(createStaticImportMap)) {
|
|
399
382
|
mergedCreateStaticHashTable[key] = createStaticImportMap[key];
|
|
400
383
|
}
|
|
401
|
-
const mergedCreateTable =
|
|
402
|
-
for (const key of
|
|
403
|
-
mergedCreateTable[key] =
|
|
404
|
-
|
|
405
|
-
const varName = key.slice(resourcePath.length + 1);
|
|
406
|
-
mergedCreateTable[varName] = scannedTables.createHashTable[key];
|
|
407
|
-
}
|
|
384
|
+
const mergedCreateTable = Object.create(scannedTables.createHashTable);
|
|
385
|
+
for (const key of (0, utils_1.fileTableKeys)(resourcePath, 'createHashTable') ?? []) {
|
|
386
|
+
mergedCreateTable[key.slice(resourcePath.length + 1)] =
|
|
387
|
+
scannedTables.createHashTable[key];
|
|
408
388
|
}
|
|
409
389
|
for (const key of Object.keys(createImportMap)) {
|
|
410
390
|
mergedCreateTable[key] = createImportMap[key];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/compiler",
|
|
3
|
-
"version": "19.2.
|
|
3
|
+
"version": "19.2.12",
|
|
4
4
|
"description": "Plumeria swc based compiler for statically extracting css",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dist/"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@plumeria/utils": "19.2.
|
|
24
|
+
"@plumeria/utils": "19.2.12"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@rust-gear/glob": "1.2.1",
|