@plumeria/core 0.2.5 → 0.3.1
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/bin/css.mjs +11 -15
- package/package.json +2 -2
package/bin/css.mjs
CHANGED
|
@@ -3,26 +3,24 @@
|
|
|
3
3
|
import { execSync } from 'child_process';
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import { styleText } from 'util';
|
|
6
|
-
import fs from 'fs';
|
|
7
6
|
|
|
8
7
|
const checkMark = styleText('greenBright', '✓');
|
|
9
8
|
|
|
10
9
|
try {
|
|
11
|
-
const isPnpm = fs.existsSync(path.join(process.cwd(), 'node_modules/.pnpm'));
|
|
12
|
-
|
|
13
10
|
const typecheck = process.argv.includes('--type-check');
|
|
14
|
-
if (typecheck)
|
|
11
|
+
if (typecheck) {
|
|
15
12
|
execSync('npx tsc --noEmit --incremental false', {
|
|
16
13
|
stdio: 'inherit',
|
|
17
14
|
cwd: process.cwd(),
|
|
18
15
|
});
|
|
16
|
+
}
|
|
19
17
|
|
|
20
|
-
const
|
|
18
|
+
const compilerPath = findCompilerPath();
|
|
21
19
|
|
|
22
20
|
const argv = process.argv.includes('--log') ? ' --log' : '';
|
|
23
|
-
execSync(
|
|
21
|
+
execSync(`npx tsx ${path.join(compilerPath, 'src/index.ts')}${argv}`, {
|
|
24
22
|
stdio: 'inherit',
|
|
25
|
-
cwd:
|
|
23
|
+
cwd: compilerPath,
|
|
26
24
|
});
|
|
27
25
|
|
|
28
26
|
const completed = typecheck ? 'Type-check completed' : '';
|
|
@@ -32,13 +30,11 @@ try {
|
|
|
32
30
|
process.exit(1);
|
|
33
31
|
}
|
|
34
32
|
|
|
35
|
-
function
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
throw new Error('Could not
|
|
33
|
+
function findCompilerPath() {
|
|
34
|
+
try {
|
|
35
|
+
const compilerMain = require.resolve('@plumeria/compiler');
|
|
36
|
+
return path.dirname(compilerMain);
|
|
37
|
+
} catch (error) {
|
|
38
|
+
throw new Error('Could not resolve @plumeria/compiler package');
|
|
41
39
|
}
|
|
42
|
-
|
|
43
|
-
return path.join(pnpmPath, plumeriaDir, 'node_modules/@plumeria');
|
|
44
40
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Near Zero-runtime CSS-in-JS for efficient design systems.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"css": "./bin/css.mjs"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
+
"@plumeria/compiler": "^0.3.0",
|
|
25
26
|
"@plumeria/collection": "^0.1.2",
|
|
26
|
-
"@plumeria/compiler": "^0.1.2",
|
|
27
27
|
"zss-engine": "^0.2.3"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|