vueless 1.4.11-beta.1 → 1.4.11-beta.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.
- package/package.json +1 -1
- package/utils/node/loaderIcon.js +3 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "1.4.11-beta.
|
|
3
|
+
"version": "1.4.11-beta.2",
|
|
4
4
|
"description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
|
|
5
5
|
"author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
|
|
6
6
|
"homepage": "https://vueless.com",
|
package/utils/node/loaderIcon.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import fs from "node:fs";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { cwd } from "node:process";
|
|
11
|
-
import { rm, cp
|
|
11
|
+
import { rm, cp } from "node:fs/promises";
|
|
12
12
|
import { createRequire } from "module";
|
|
13
13
|
|
|
14
14
|
import { getVuelessConfig } from "./vuelessConfig.js";
|
|
@@ -166,7 +166,7 @@ async function cachePackageIcons(isStorybookEnv) {
|
|
|
166
166
|
const internalCachePath = path.join(cwd(), ICONS_CACHED_DIR, INTERNAL_ICONS_LIBRARY);
|
|
167
167
|
|
|
168
168
|
if (fs.existsSync(internalVuelessPath)) {
|
|
169
|
-
await
|
|
169
|
+
await cp(internalVuelessPath, internalCachePath, { recursive: true });
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
/* copy storybook icons for storybook only */
|
|
@@ -175,30 +175,11 @@ async function cachePackageIcons(isStorybookEnv) {
|
|
|
175
175
|
const storybookCachePath = path.join(cwd(), ICONS_CACHED_DIR, STORYBOOK_ICONS_LIBRARY);
|
|
176
176
|
|
|
177
177
|
if (fs.existsSync(storybookVuelessPath)) {
|
|
178
|
-
await
|
|
178
|
+
await cp(storybookVuelessPath, storybookCachePath, { recursive: true });
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
/**
|
|
184
|
-
* Copy a directory tolerating a destination created by a concurrent build.
|
|
185
|
-
* Node's `cp` does a non-atomic `mkdir` per directory, so two builds racing
|
|
186
|
-
* to create the same cache folder throw `EEXIST`. Pre-creating the destination
|
|
187
|
-
* with `recursive: true` (idempotent) and swallowing `EEXIST` makes it safe.
|
|
188
|
-
* @param {string} from
|
|
189
|
-
* @param {string} to
|
|
190
|
-
* @returns {Promise<void>}
|
|
191
|
-
*/
|
|
192
|
-
async function safeCopyDir(from, to) {
|
|
193
|
-
await mkdir(to, { recursive: true });
|
|
194
|
-
|
|
195
|
-
try {
|
|
196
|
-
await cp(from, to, { recursive: true, force: true });
|
|
197
|
-
} catch (error) {
|
|
198
|
-
if (error?.code !== "EEXIST") throw error;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
183
|
/**
|
|
203
184
|
* Scan the project for icon names and copy found icons to the cache.
|
|
204
185
|
* @param {Array} files
|