@plumeria/compiler 0.7.3 → 0.7.7

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 CHANGED
@@ -32,8 +32,8 @@ try {
32
32
  : path.join(process.cwd(), 'node_modules/@plumeria');
33
33
 
34
34
  const rscutePath = isPnpm
35
- ? findPnpmPath('rscute@', 'node_modules/rscute/dist/execute.js')
36
- : path.join(process.cwd(), 'node_modules/rscute/dist/execute.js');
35
+ ? findPnpmPath('rscute@', 'node_modules/rscute/dist/jit.js')
36
+ : path.join(process.cwd(), 'node_modules/rscute/dist/jit.js');
37
37
 
38
38
  const argv = process.argv.includes('--log') ? ' --log' : '';
39
39
  execSync(`node ${rscutePath} compiler/dist/index.js` + argv, {
package/dist/index.js CHANGED
@@ -1,14 +1,18 @@
1
1
  import * as path from 'path';
2
2
  import * as fs from 'fs';
3
- import { execute } from 'rscute';
4
3
  import ts from 'typescript';
5
4
  import fg from 'fast-glob';
6
5
  import { buildCreate } from '@plumeria/core/dist/method/create-build-helper';
7
6
  import { buildGlobal } from '@plumeria/core/dist/method/global-build-helper';
7
+ import { JIT } from 'rscute';
8
+ const projectRoot = process.cwd().split('node_modules')[0];
9
+ const directPath = path.join(projectRoot, 'node_modules/@plumeria/core');
10
+ const coreFilePath = path.join(directPath, 'stylesheet/core.css');
8
11
  const cleanUp = async () => {
9
- const projectRoot = process.cwd().split('node_modules')[0];
10
- const directPath = path.join(projectRoot, 'node_modules/@plumeria/core');
11
- const coreFilePath = path.join(directPath, 'stylesheet/core.css');
12
+ if (process.env.CI && fs.existsSync(coreFilePath)) {
13
+ fs.unlinkSync(coreFilePath);
14
+ console.log('File deleted successfully');
15
+ }
12
16
  try {
13
17
  fs.writeFileSync(coreFilePath, '', 'utf-8');
14
18
  }
@@ -39,16 +43,11 @@ async function getAppRoot() {
39
43
  await cleanUp();
40
44
  const appRoot = await getAppRoot();
41
45
  const files = await fg([path.join(appRoot, '**/*.{js,jsx,ts,tsx}')], {
42
- ignore: [
43
- '**/main.{js,ts}/**',
44
- '**/dist/**',
45
- '**/.next/**',
46
- '**/node_modules/**',
47
- ],
46
+ ignore: ['**/node_modules/**', '**/dist/**', '**/.next/**'],
48
47
  });
49
48
  const styleFiles = files.filter(isCSS);
50
49
  for (let i = 0; i < styleFiles.length; i++) {
51
- await execute(path.resolve(styleFiles[i]));
50
+ await JIT(path.resolve(styleFiles[i]));
52
51
  }
53
52
  for (let i = 0; i < styleFiles.length; i++) {
54
53
  await buildGlobal();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/compiler",
3
- "version": "0.7.3",
3
+ "version": "0.7.7",
4
4
  "description": "A faster compiler for Plumeria",
5
5
  "keywords": [
6
6
  "css",
@@ -22,8 +22,8 @@
22
22
  "build": "rimraf dist && tsc"
23
23
  },
24
24
  "dependencies": {
25
- "fast-glob": "^3.3.3",
26
- "rscute": "^0.0.14"
25
+ "fast-glob": "3.3.3",
26
+ "rscute": "0.1.3"
27
27
  },
28
28
  "publishConfig": {
29
29
  "access": "public"