Created
January 5, 2017 21:00
-
-
Save SanthoshVijayabaskar/66c827cad2c808cc5f9ff6fab86cc396 to your computer and use it in GitHub Desktop.
Gulp file which uses Webpack to Build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var webpack = require('webpack-stream'); | |
var serve = require('gulp-serve'); | |
// Webpack | |
gulp.task('webpack', function() { | |
return gulp.src('./app.js') | |
.pipe(webpack(require('./webpack.config.js'))) | |
.pipe(gulp.dest('./')); | |
}); | |
// Web Server | |
gulp.task('serve:web', serve({ | |
root: ['.'], | |
port: 8000 | |
})); | |
gulp.task('default', ['webpack', 'serve:web']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment