@plumeria/compiler 0.9.0 → 0.9.5
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 +5 -11
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const { unlinkSync, existsSync, readFileSync } = require('fs');
|
|
4
4
|
const { readFile, writeFile } = require('fs/promises');
|
|
5
|
-
const
|
|
5
|
+
const { glob } = require('@rust-gear/glob');
|
|
6
6
|
const postcss = require('postcss');
|
|
7
7
|
const combineSelectors = require('postcss-combine-duplicated-selectors');
|
|
8
8
|
const { execute } = require('rscute/execute');
|
|
@@ -81,28 +81,22 @@ async function optimizeCSS() {
|
|
|
81
81
|
const optimizedCss = Buffer.from(light.code).toString('utf-8');
|
|
82
82
|
await writeFile(coreFilePath, optimizedCss, 'utf-8');
|
|
83
83
|
}
|
|
84
|
-
async function getAppRoot() {
|
|
85
|
-
const threeLevelsUp = path.join(process.cwd(), '../../../../..');
|
|
86
|
-
return existsSync(path.join(threeLevelsUp, 'node_modules/.pnpm'))
|
|
87
|
-
? path.join(process.cwd(), '../../../../../')
|
|
88
|
-
: path.join(process.cwd(), '../../');
|
|
89
|
-
}
|
|
90
84
|
(async () => {
|
|
91
85
|
await cleanUp();
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
ignore: [
|
|
86
|
+
const files = await glob(path.join(projectRoot, '**/*.{js,jsx,ts,tsx}'), {
|
|
87
|
+
exclude: [
|
|
95
88
|
'**/node_modules/**',
|
|
96
89
|
'**/dist/**',
|
|
97
90
|
'**/build/**',
|
|
98
91
|
'**/.next/**',
|
|
99
92
|
],
|
|
93
|
+
cwd: projectRoot,
|
|
100
94
|
});
|
|
101
95
|
const styleFiles = files.filter(isCSS).sort();
|
|
102
96
|
for (let i = 0; i < styleFiles.length; i++) {
|
|
103
97
|
await execute(path.resolve(styleFiles[i]));
|
|
104
98
|
if (process.argv.includes('--paths'))
|
|
105
|
-
console.log(styleFiles[i]);
|
|
99
|
+
console.log(path.relative(projectRoot, styleFiles[i]));
|
|
106
100
|
}
|
|
107
101
|
for (let i = 0; i < styleFiles.length; i++) {
|
|
108
102
|
await buildGlobal(coreFilePath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/compiler",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"description": "A faster compiler for Plumeria",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"css": "./bin/css.js"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
+
"@rust-gear/glob": "^0.2.1",
|
|
22
23
|
"@swc/core": "^1.11.24",
|
|
23
|
-
"fast-glob": "^3.3.3",
|
|
24
24
|
"lightningcss": "^1.29.3",
|
|
25
25
|
"postcss": "^8.5.3",
|
|
26
26
|
"postcss-combine-duplicated-selectors": "^10.0.3",
|