Commit 35e7b81c authored by Piotr Gawron's avatar Piotr Gawron
Browse files

clean script is OS independent

parent 2d519068
......@@ -9,7 +9,7 @@
"//": "rm -rf dist & rmdir /q /s dist & mkdir dist & browserify --debug --standalone minerva src/main/js/minerva.js | exorcist dist/minerva.js.map > dist/minerva.js & uglifyjs --compress --mangle --in-source-map dist/minerva.js.map --source-map-include-sources --source-map dist/minerva.min.js.map -o dist/minerva.min.js dist/minerva.js",
"build-deploy": "npm run build && npm run deploy",
"build": "npm run clean && npm run build:css && npm run build:js",
"clean": "rm -rf dist & rmdir /q /s dist & mkdir dist",
"clean": "node scripts/clean.js",
"deploy": "copy /Y \"dist\\*.js*\" \"C:/Program Files/apache-tomcat-7.0.72/webapps/minerva/resources/js\" && copy /Y \"dist\\*.css\" \"C:/Program Files/apache-tomcat-7.0.72/webapps/minerva/resources/css\" ",
"lint": "jshint src/.",
"test": "istanbul cover node_modules/mocha/bin/_mocha -- --recursive src/test/js"
......@@ -36,10 +36,12 @@
"uglifyjs": "^2.4.10"
},
"dependencies": {
"del": "^3.0.0",
"dual-listbox": "^1.0.3",
"http-status-codes": "^1.1.6",
"js-cookie": "^2.1.3",
"log4js": "0.6.38",
"mkdirp": "^0.5.1",
"pileup": "^0.6.8",
"request": "^2.79.0"
}
......
var del = require('del');
var mkdirp = require('mkdirp');
var exec = require('child_process').exec;
function puts(error, stdout, stderr) { console.log(stdout) }
var os = require('os');
//control OS
//then run command depengin on the OS
del(["dist/"]).then(function(){
return mkdirp("dist");
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment