Skip to content

Commit 3dfb85c

Browse files
committed
Replace the use of fs-extra with FileSystem
1 parent 8a2e8f3 commit 3dfb85c

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

build-tests/localization-plugin-test/build.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const fsx = require('fs-extra');
1+
const { FileSystem } = require('@microsoft/node-core-library');
22
const child_process = require('child_process');
33
const path = require('path');
44
const process = require('process');
@@ -12,9 +12,9 @@ function executeCommand(command) {
1212

1313
// Clean the old build outputs
1414
console.log(`==> Starting build.js for ${path.basename(process.cwd())}`);
15-
fsx.emptyDirSync('dist');
16-
fsx.emptyDirSync('lib');
17-
fsx.emptyDirSync('temp');
15+
FileSystem.ensureEmptyFolder('dist');
16+
FileSystem.ensureEmptyFolder('lib');
17+
FileSystem.ensureEmptyFolder('temp');
1818

1919
LocJsonPreprocessor.preprocessLocJsonFiles({
2020
srcFolder: path.resolve(__dirname, 'src'),

build-tests/localization-plugin-test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
},
1010
"dependencies": {
1111
"@microsoft/set-webpack-public-path-plugin": "2.3.3",
12+
"@microsoft/node-core-library": "3.19.2",
1213
"@rushstack/localization-plugin": "0.0.0",
1314
"@types/webpack-env": "1.13.0",
14-
"fs-extra": "~7.0.1",
1515
"@microsoft/rush-stack-compiler-3.5": "0.4.2",
1616
"ts-loader": "6.0.0",
1717
"webpack": "~4.31.0",

build-tests/localization-plugin-test/serve.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const fsx = require('fs-extra');
1+
const { FileSystem } = require('@microsoft/node-core-library');
22
const child_process = require('child_process');
33
const path = require('path');
44
const process = require('process');
@@ -12,9 +12,9 @@ function executeCommand(command) {
1212

1313
// Clean the old build outputs
1414
console.log(`==> Starting build.js for ${path.basename(process.cwd())}`);
15-
fsx.emptyDirSync('dist');
16-
fsx.emptyDirSync('lib');
17-
fsx.emptyDirSync('temp');
15+
FileSystem.ensureEmptyFolder('dist');
16+
FileSystem.ensureEmptyFolder('lib');
17+
FileSystem.ensureEmptyFolder('temp');
1818

1919
LocJsonPreprocessor.preprocessLocJsonFiles({
2020
srcFolder: path.resolve(__dirname, 'src'),

0 commit comments

Comments
 (0)