-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
50 lines (43 loc) · 945 Bytes
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
eslint: {
target: ['src/**/*.js']
},
babel: {
options: {
presets: ['es2015'],
},
dist: {
files: [{
expand: true,
flatten: false,
cwd: 'src/',
src: ['**/*.js'],
dest: 'dist/',
ext: '.js'
}]
}
},
watch: {
babel: {
files: [
'src/app.js',
'src/routes/**/*.js',
'src/bin/**/*.js',
'src/latex/**/*.js'
],
tasks: ['babel'],
options: {
spawn: false
},
}
},
});
require('load-grunt-tasks')(grunt);
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task(s).
grunt.registerTask('default', ['babel']);
grunt.registerTask('dev', ['eslint', 'babel', 'watch']);
};