2015-02-03 02:18:45 +01:00
|
|
|
var gulp = require('gulp');
|
2015-07-22 04:38:46 +02:00
|
|
|
var gulpWebpack = require('webpack-stream');
|
|
|
|
var livereload = require('gulp-livereload');
|
2015-02-03 02:18:45 +01:00
|
|
|
|
|
|
|
var webpackConfig = require('../webpack.config');
|
|
|
|
webpackConfig.devtool = "#source-map";
|
|
|
|
|
|
|
|
gulp.task('webpack', function() {
|
2015-07-22 04:38:46 +02:00
|
|
|
return gulp.src('main.js').pipe(gulpWebpack(webpackConfig)).pipe(gulp.dest(''));
|
2015-02-03 02:18:45 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('webpackWatch', function() {
|
2015-07-22 04:38:46 +02:00
|
|
|
webpackConfig.watch = true;
|
|
|
|
return gulp.src('main.js').pipe(gulpWebpack(webpackConfig)).pipe(gulp.dest('')).pipe(livereload());
|
2015-02-03 02:18:45 +01:00
|
|
|
});
|