-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
43 lines (37 loc) · 1010 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
module.exports = function(grunt) {
// load dependent tasks
grunt.loadNpmTasks('grunt-webpack');
grunt.loadNpmTasks('grunt-contrib-copy');
// load webpack
var webpack = require("webpack");
// load the webpack config
var webpackConfig = require("./webpack.config.js");
console.log(webpackConfig);
// initialize grunt
grunt.initConfig({
webpack: {
jumpstart: webpackConfig
},
"webpack-dev-server":
{
jumpstart:{
hot: true,
webpack: webpackConfig,
keepalive: true,
contentBase: 'app/',
historyApiFallback:true
//https:true
}
},
copy: {
bootstrap: {
files: [
// includes files within path and its sub-directories
{expand: true, cwd: './node_modules/bootstrap/dist/', src: ['**'], dest: 'app/'},
],
},
},
});
grunt.registerTask('default', ['copy:bootstrap','webpack']);
grunt.registerTask('dev', ['copy:bootstrap', 'webpack-dev-server']);
};