@plumeria/compiler 0.6.1 → 0.6.2

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.
Files changed (2) hide show
  1. package/bin/css.mjs +10 -8
  2. package/package.json +1 -1
package/bin/css.mjs CHANGED
@@ -5,28 +5,28 @@ import path from 'path';
5
5
  import { styleText } from 'util';
6
6
  import fs from 'fs';
7
7
 
8
- const checkMark = styleText('greenBright', '✓');
9
-
10
8
  try {
9
+ const checkMark = styleText('greenBright', '✓');
11
10
  const isPnpm = fs.existsSync(path.join(process.cwd(), 'node_modules/.pnpm'));
12
-
13
11
  const typecheck = process.argv.includes('--type-check');
12
+ const compilation = typecheck ? 'Type-check completed' : '';
13
+ console.log(` ${checkMark} Compilation... ${compilation}`);
14
+
14
15
  if (typecheck)
15
16
  execSync('npx tsc --noEmit --incremental false', {
16
17
  stdio: 'inherit',
17
18
  cwd: process.cwd(),
18
19
  });
19
20
 
20
- const plumeriaPath = isPnpm ? findPnpmPlumeriaPath() : path.join(process.cwd(), 'node_modules/@plumeria');
21
+ const plumeriaPath = isPnpm
22
+ ? findPnpmPlumeriaPath()
23
+ : path.join(process.cwd(), 'node_modules/@plumeria');
21
24
 
22
25
  const argv = process.argv.includes('--log') ? ' --log' : '';
23
26
  execSync('npx tsx compiler/src/index.ts' + argv, {
24
27
  stdio: 'inherit',
25
28
  cwd: plumeriaPath,
26
29
  });
27
-
28
- const completed = typecheck ? 'Type-check completed' : '';
29
- console.log(` ${checkMark} Compiled... ${completed}`);
30
30
  } catch (error) {
31
31
  console.error('Compilation failed:', error.message);
32
32
  process.exit(1);
@@ -34,7 +34,9 @@ try {
34
34
 
35
35
  function findPnpmPlumeriaPath() {
36
36
  const pnpmPath = path.join(process.cwd(), 'node_modules/.pnpm');
37
- const plumeriaDir = fs.readdirSync(pnpmPath).find(dir => dir.startsWith('@plumeria+compiler@'));
37
+ const plumeriaDir = fs
38
+ .readdirSync(pnpmPath)
39
+ .find((dir) => dir.startsWith('@plumeria+compiler@'));
38
40
 
39
41
  if (!plumeriaDir) {
40
42
  throw new Error('Could not find @plumeria package in pnpm directory');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/compiler",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Compiler for Plumeria that build and optimizes",
5
5
  "keywords": [
6
6
  "react",