-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
44 lines (39 loc) · 1.17 KB
/
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
module.exports = function(grunt) {
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
webpack: {
dist: {
entry: './es6/app.es6',
output: {
path: 'es6',
filename: 'bundle.es6'
},
module: {
loaders: [
{ test: /\.es6|\.js$/, exclude: /node_modules/, loader: 'babel-loader' }
]
}
}
},
babel: {
// options: {
// sourceMap: false
// },
dist: {
files: {
'es5/script.js': 'es6/bundle.es6'
}
// Howto: transpile and copy multiple files to a new dest
// expand: true,
// cwd: 'es6/',
// src: ['**/*'],
// dest: 'es5/',
// ext: '.js'
}
}
});
// Default task(s).
grunt.registerTask('default', ['webpack', 'babel']);
};