Commit d57f4eac authored by Piotr Gawron's avatar Piotr Gawron
Browse files

deploy script is platform independent

parent a97e4b76
<component name="ProjectDictionaryState">
<dictionary name="gawi">
<words>
<w>mkdirp</w>
</words>
</dictionary>
</component>
\ No newline at end of file
......@@ -10,7 +10,7 @@
"build-deploy": "npm run build && npm run deploy",
"build": "npm run clean && npm run build:css && npm run build:js",
"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\" ",
"deploy": "node scripts/deploy.js",
"lint": "jshint src/.",
"test": "istanbul cover node_modules/mocha/bin/_mocha -- --recursive src/test/js"
},
......
......@@ -2,14 +2,6 @@ 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");
del(["dist/"]).then(function () {
return mkdirp("dist");
});
var fs = require('fs');
var tomcatDirectory = process.env.CATALINA_HOME;
fs.createReadStream('dist/minerva.js').pipe(fs.createWriteStream(tomcatDirectory + '/webapps/minerva/resources/js/minerva.js'));
fs.createReadStream('dist/minerva.css').pipe(fs.createWriteStream(tomcatDirectory + '/webapps/minerva/resources/css/minerva.css'));
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