@plumeria/compiler 0.18.1 → 0.18.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/dist/index.js +4 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -69,7 +69,7 @@ const cleanUp = async () => {
69
69
  console.error('An error occurred:', err);
70
70
  }
71
71
  };
72
- function isCSS(filePath, target) {
72
+ function isCSS(filePath) {
73
73
  if (statSync(filePath).isDirectory()) {
74
74
  return false;
75
75
  }
@@ -84,13 +84,7 @@ function isCSS(filePath, target) {
84
84
  function visit(node) {
85
85
  if (node.type === 'MemberExpression' && node.property?.value) {
86
86
  if (node.object?.type === 'Identifier' && node.object.value === 'css') {
87
- if (target === 'props') {
88
- if (node.property.value === 'props') {
89
- found = true;
90
- }
91
- }
92
- else if (node.property.value === 'props' ||
93
- node.property.value === 'global') {
87
+ if (node.property.value === 'props') {
94
88
  found = true;
95
89
  }
96
90
  }
@@ -154,11 +148,8 @@ async function optimizeCSS() {
154
148
  }
155
149
  }
156
150
  const styleFiles = filesSupportExtensions
157
- .filter((file) => isCSS(file, ''))
151
+ .filter((file) => isCSS(file))
158
152
  .sort();
159
- const propsFiles = styleFiles.filter((file) => {
160
- return isCSS(file, 'props');
161
- });
162
153
  for (let i = 0; i < styleFiles.length; i++) {
163
154
  await execute(path.resolve(styleFiles[i]));
164
155
  if (process.argv.includes('--paths'))
@@ -167,7 +158,7 @@ async function optimizeCSS() {
167
158
  for (let i = 0; i < styleFiles.length; i++) {
168
159
  await buildGlobal(coreFilePath);
169
160
  }
170
- for (let i = 0; i < propsFiles.length; i++) {
161
+ for (let i = 0; i < styleFiles.length; i++) {
171
162
  await buildProps(coreFilePath);
172
163
  }
173
164
  await optimizeCSS();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/compiler",
3
- "version": "0.18.1",
3
+ "version": "0.18.2",
4
4
  "description": "Plumeria Rust-based compiler",
5
5
  "repository": {
6
6
  "type": "git",