@plumeria/compiler 0.22.4 → 0.23.0

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/dist/index.js +7 -41
  2. package/package.json +1 -2
package/dist/index.js CHANGED
@@ -1,45 +1,11 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
36
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
4
  };
38
5
  Object.defineProperty(exports, "__esModule", { value: true });
39
6
  const path_1 = __importDefault(require("path"));
40
- const fs_1 = __importStar(require("fs"));
7
+ const fs_1 = require("fs");
41
8
  const promises_1 = require("fs/promises");
42
- const glob_1 = require("@rust-gear/glob");
43
9
  const postcss_1 = __importDefault(require("postcss"));
44
10
  const postcss_combine_media_query_1 = __importDefault(require("postcss-combine-media-query"));
45
11
  const execute_1 = require("rscute/execute");
@@ -51,13 +17,13 @@ const extract_1 = require("./extract");
51
17
  let projectRoot;
52
18
  const workspaceRootFile = (0, find_up_1.findUpSync)((directory) => {
53
19
  const pnpmWsPath = path_1.default.join(directory, 'pnpm-workspace.yaml');
54
- if (fs_1.default.existsSync(pnpmWsPath)) {
20
+ if ((0, fs_1.existsSync)(pnpmWsPath)) {
55
21
  return pnpmWsPath;
56
22
  }
57
23
  const pkgJsonPath = path_1.default.join(directory, 'package.json');
58
- if (fs_1.default.existsSync(pkgJsonPath)) {
24
+ if ((0, fs_1.existsSync)(pkgJsonPath)) {
59
25
  try {
60
- const pkgJson = JSON.parse(fs_1.default.readFileSync(pkgJsonPath, 'utf-8'));
26
+ const pkgJson = JSON.parse((0, fs_1.readFileSync)(pkgJsonPath, 'utf-8'));
61
27
  if (pkgJson.workspaces) {
62
28
  return pkgJsonPath;
63
29
  }
@@ -82,7 +48,7 @@ else {
82
48
  }
83
49
  let coreFilePath;
84
50
  const coreSourcePackageJsonPath = path_1.default.join(process.cwd(), 'package.json');
85
- const coreSourcePackageJson = JSON.parse(fs_1.default.readFileSync(coreSourcePackageJsonPath, 'utf-8'));
51
+ const coreSourcePackageJson = JSON.parse((0, fs_1.readFileSync)(coreSourcePackageJsonPath, 'utf-8'));
86
52
  const dependencies = {
87
53
  ...coreSourcePackageJson.dependencies,
88
54
  ...coreSourcePackageJson.devDependencies,
@@ -96,7 +62,7 @@ if (workspaceRootFile) {
96
62
  coreFilePath = path_1.default.join(path_1.default.dirname(resolvedCorePackageJsonPath), 'stylesheet.css');
97
63
  }
98
64
  else {
99
- const corePackageJson = JSON.parse(fs_1.default.readFileSync(resolvedCorePackageJsonPath, 'utf-8'));
65
+ const corePackageJson = JSON.parse((0, fs_1.readFileSync)(resolvedCorePackageJsonPath, 'utf-8'));
100
66
  const exactCoreVersion = corePackageJson.version;
101
67
  coreFilePath = path_1.default.join(projectRoot, 'node_modules', '.pnpm', `@plumeria+core@${exactCoreVersion}`, 'node_modules', '@plumeria', 'core', 'stylesheet.css');
102
68
  }
@@ -176,7 +142,7 @@ async function optimizeCSS() {
176
142
  (async () => {
177
143
  await cleanUp();
178
144
  const scanRoot = process.cwd();
179
- const files = await (0, glob_1.glob)('**/*.{js,jsx,ts,tsx,vue,svelte}', {
145
+ const files = (0, fs_1.globSync)('**/*.{js,jsx,ts,tsx,vue,svelte}', {
180
146
  cwd: scanRoot,
181
147
  exclude: ['**/node_modules/**', '**/dist/**', '**/build/**', '**/.next/**'],
182
148
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/compiler",
3
- "version": "0.22.4",
3
+ "version": "0.23.0",
4
4
  "description": "Plumeria Rust-based compiler",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,7 +16,6 @@
16
16
  "css": "./bin/css.js"
17
17
  },
18
18
  "dependencies": {
19
- "@rust-gear/glob": "^0.2.3",
20
19
  "@swc/core": "^1.11.24",
21
20
  "find-up": "^7.0.0",
22
21
  "lightningcss": "^1.29.3",