resume/Gruntfile.js
2017-03-05 20:30:37 +01:00

47 lines
1.3 KiB
JavaScript
Executable File

module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-exec');
require('load-grunt-tasks')(grunt);
grunt.initConfig({
babel: {
options: {
sourceMap: true,
presets: ['es2015']
},
dist: {
files: {
'public/javascript.js': 'src/public/javascript.js'
}
}
},
exec: {
less: 'node --harmony-async-await src/app.js less',
wait: 'node --harmony-async-await src/app.js wait'
},
bgShell: {
_defaults: {
bg: true
},
express: {
cmd: 'npm run server'
}
},
watch: {
app: {
files: [
'src/**/*.js',
'resumes/**/*.mustache',
'resumes/**/*.less',
'less/**/*.less'
],
tasks: ['exec:less', 'babel', 'bgShell:express', 'exec:wait'],
options: {
nospawn: false,
livereload: true
}
}
}
});
grunt.registerTask('default', ['babel', 'exec:less', 'bgShell:express', 'exec:wait', 'watch']);
};