Use rimraf in build process

So it works on Windows 7
This commit is contained in:
Rob Garrison 2018-08-11 19:36:05 -05:00
parent 489c014fe9
commit 4795154cf7
2 changed files with 10 additions and 1 deletions

View File

@ -13,6 +13,7 @@
"jsonlint": "^1.6.3",
"less": "^3.8.1",
"lz-string-unsafe": "^1.4.4-fork-1",
"rimraf": "^2.6.2",
"semver-bundle": "^0.1.1",
"stylelint-bundle": "^8.0.0",
"stylus-lang-bundle": "^0.54.5",
@ -23,7 +24,7 @@
"update": "npm run update-node && npm run update-main",
"update-quick": "updates -u && npm update && npm run update-main",
"update-main": "npm run update-versions && npm run update-codemirror",
"update-node": "updates -u && rm -rf node_modules && npm install",
"update-node": "updates -u && node tools/remove-modules.js && npm install",
"update-codemirror": "node tools/update-libraries.js && node tools/update-codemirror-themes.js",
"update-versions": "node tools/update-versions",
"zip": "npm run update-versions && node tools/zip.js"

8
tools/remove-modules.js Normal file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env node
'use strict';
const fs = require('fs');
const rimraf = require('rimraf');
// See https://github.com/isaacs/rimraf/issues/102#issuecomment-412310309
rimraf('node_modules/!(rimraf|.bin)', fs, () => {});