-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
35 lines (29 loc) · 746 Bytes
/
gulpfile.js
File metadata and controls
35 lines (29 loc) · 746 Bytes
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
/**
* Description:
* User: 常胤 <satans17@gmail.com>
* Date: 15/3/30
* Copyright(c) 2014 Taobao.com
*/
var gulp = require("gulp");
var webpack = require('gulp-webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var dist = "./build";
gulp.task("build", function () {
return gulp.src(['./src/app.js'])
.pipe(webpack({
module: {
loaders: [
{test: /\.js$/, loader: 'babel-loader'},
{ test: /\.css$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader") }
]
},
plugins: [
new ExtractTextPlugin("[name].css")
],
output: {
path: "/build"
}
}))
.pipe(gulp.dest(dist));
});
gulp.task('default', ['build']);