Skip to content

Instantly share code, notes, and snippets.

@SanthoshVijayabaskar
Created January 5, 2017 21:00
Show Gist options
  • Save SanthoshVijayabaskar/66c827cad2c808cc5f9ff6fab86cc396 to your computer and use it in GitHub Desktop.
Save SanthoshVijayabaskar/66c827cad2c808cc5f9ff6fab86cc396 to your computer and use it in GitHub Desktop.
Gulp file which uses Webpack to Build
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