ADD args to grunt
This commit is contained in:
parent
f20686c75b
commit
866adcd94d
@ -15,9 +15,10 @@ module.exports = function(grunt) {
|
||||
execute: {
|
||||
target: {
|
||||
options: {
|
||||
nodeargs: ['--harmony-async-await']
|
||||
nodeargs: ['--harmony-async-await'],
|
||||
args: ['less']
|
||||
},
|
||||
src: ['src/less.js']
|
||||
src: ['src/app.js']
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@ -15,15 +15,17 @@ module.exports = function(grunt) {
|
||||
execute: {
|
||||
less: {
|
||||
options: {
|
||||
nodeargs: ['--harmony-async-await']
|
||||
nodeargs: ['--harmony-async-await'],
|
||||
args: ['less']
|
||||
},
|
||||
src: ['src/less.js']
|
||||
src: ['src/app.js']
|
||||
},
|
||||
pdf: {
|
||||
options: {
|
||||
nodeargs: ['--harmony-async-await']
|
||||
nodeargs: ['--harmony-async-await'],
|
||||
args: ['pdf']
|
||||
},
|
||||
src: ['src/generatePdfs.js']
|
||||
src: ['src/app.js']
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
"grunt"
|
||||
],
|
||||
"scripts": {
|
||||
"server": "node --harmony-async-await src/app.js",
|
||||
"server": "node --harmony-async-await src/app.js server",
|
||||
"dev": "concurrently --kill-others \"npm run server\" \"grunt --verbose\"",
|
||||
"pdf": "concurrently \"npm run server\" \"grunt --gruntfile GruntfilePdf.js --verbose\"",
|
||||
"lint": "eslint src/",
|
||||
@ -69,16 +69,11 @@
|
||||
"grunt": "^1.0.1",
|
||||
"grunt-babel": "^6.0.0",
|
||||
"grunt-cli": "^1.2.0",
|
||||
"grunt-contrib-copy": "^1.0.0",
|
||||
"grunt-contrib-less": "^1.4.0",
|
||||
"grunt-contrib-watch": "^1.0.0",
|
||||
"grunt-execute": "^0.2.2",
|
||||
"grunt-run": "^0.6.0",
|
||||
"grunt-shell": "^2.1.0",
|
||||
"jit-grunt": "^0.10.0",
|
||||
"load-grunt-tasks": "^3.5.2",
|
||||
"mocha": "3.2.0",
|
||||
"nyc": "10.1.2",
|
||||
"reload": "^1.1.1"
|
||||
"nyc": "10.1.2"
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
17
src/app.js
17
src/app.js
@ -1,2 +1,17 @@
|
||||
const StyleCompiler = require('./StyleCompiler');
|
||||
const ResumeToPdf = require('./ResumeToPdf');
|
||||
const Server = require('./Server');
|
||||
Server.run();
|
||||
|
||||
process.argv.forEach(argument => {
|
||||
switch (argument) {
|
||||
case 'less':
|
||||
StyleCompiler.run();
|
||||
break;
|
||||
case 'pdf':
|
||||
ResumeToPdf.convert();
|
||||
break;
|
||||
case 'server':
|
||||
Server.run();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
const ResumeToPdf = require('./ResumeToPdf');
|
||||
ResumeToPdf.convert();
|
||||
@ -1,2 +0,0 @@
|
||||
const StyleCompiler = require('./StyleCompiler');
|
||||
StyleCompiler.run();
|
||||
Loading…
x
Reference in New Issue
Block a user