Skip to content

Commit db0490f

Browse files
authored
Replace rimraf with rmdir in postinstall (#41)
Otherwise when you install for production this errors since rimraf is a development-only module.
1 parent d4f09b4 commit db0490f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

extensions/postinstall.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
const fs = require('fs');
1010
const path = require('path');
11-
const rimraf = require('rimraf');
1211

1312
const root = path.join(__dirname, 'node_modules', 'typescript');
1413

@@ -21,12 +20,12 @@ function processRoot() {
2120
if (!toKeep.has(name)) {
2221
const filePath = path.join(root, name);
2322
console.log(`Removed ${filePath}`);
24-
rimraf.sync(filePath);
23+
fs.rmdirSync(filePath, { recursive: true });
2524
}
2625
}
2726

2827
// Delete .bin so it doesn't contain broken symlinks that trip up nfpm.
29-
rimraf.sync(path.join(__dirname, 'node_modules', '.bin'));
28+
fs.rmdirSync(path.join(__dirname, 'node_modules', '.bin'), { recursive: true });
3029
}
3130

3231
function processLib() {

0 commit comments

Comments
 (0)