Skip to content

Commit 656e572

Browse files
committed
chore: migrate fs-extra code to native node:fs code
1 parent 1487fab commit 656e572

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/multiple-select-vanilla/build-watch.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { exec, execSync } from 'node:child_process';
22
import path from 'node:path';
33
import copyfiles from 'copyfiles';
44
import { buildSync } from 'esbuild';
5-
import { outputFileSync } from 'fs-extra/esm';
5+
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
66
import { compile as sassCompile } from 'sass';
77

88
const env = process.env.NODE_ENV;
@@ -83,7 +83,11 @@ async function runCompilation(changedFiles) {
8383
const absoluteFilePath = path.relative(basePath, changedFile);
8484
const posixPath = absoluteFilePath.replaceAll('\\', '/');
8585

86-
outputFileSync(
86+
const outDir = 'dist/styles/css';
87+
if (!existsSync(outDir)) {
88+
mkdirSync(outDir, { recursive: true });
89+
}
90+
writeFileSync(
8791
`dist/styles/css/${posixPath.replace('.scss', '')}.css`,
8892
sassCompile(`src/styles/${posixPath}`, { style: 'compressed', quietDeps: true, noSourceMap: true }).css,
8993
);

packages/multiple-select-vanilla/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
"cross-env": "^7.0.3",
8383
"cssnano": "^7.0.6",
8484
"esbuild": "^0.24.0",
85-
"fs-extra": "^11.2.0",
8685
"postcss": "^8.4.47",
8786
"postcss-cli": "^11.0.0",
8887
"sass": "^1.79.5",

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)