const gulp        = require('gulp');
const rename      = require('gulp-rename');
const browserSync = require('browser-sync');
const webpack     = require('webpack-stream');
const wb          = require('./../node_modules/webpack');

const config = {
	module: {
		loaders: [
			{ test: /\.csv?$/, loader: 'dsv-loader' },
			{ test: /\.json$/, loader: 'json-loader' },
			{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'}
		]
	}
};

gulp.task('js-dev', function() {
	return gulp.src('src/js/main.js')
		.pipe(webpack(config))
		.pipe(rename('bundle.js'))
		.pipe(gulp.dest('dist/dev/js'))
		.pipe(browserSync.reload({stream:true}));
});

gulp.task('js-prod', function() {

	const prod_config = Object.assign({}, config, {

		plugins: [
			new wb.optimize.UglifyJsPlugin(),
			new wb.optimize.OccurenceOrderPlugin(),
			new wb.optimize.DedupePlugin()
		]

	});

	return gulp.src('src/js/main.js')
		.pipe(webpack(prod_config))
		.pipe(rename('bundle.js'))
		.pipe(gulp.dest('.tmp/js'))
});


@@ -3,32 +3,34 @@
 nst gulp        
+  
 = require('gulp'
@@ -46,24 +46,26 @@
 rename      
+  
 = require('g
@@ -96,16 +96,18 @@
 serSync 
+  
 = requir
@@ -138,20 +138,22 @@
  webpack
-    
+Stream
  = requi
@@ -185,12 +185,14 @@
 st w
-b   
+ebpack
     
@@ -209,26 +209,8 @@
 re('
-./../node_modules/
 webp
@@ -514,16 +514,22 @@
 (webpack
+Stream
 (config)
@@ -740,33 +740,38 @@
 gins: %5B%0A%09%09%09new w
-b
+ebpack
 .optimize.Uglify
@@ -782,33 +782,38 @@
 ugin(),%0A%09%09%09new w
-b
+ebpack
 .optimize.Occure
@@ -838,17 +838,22 @@
 %09%09%09new w
-b
+ebpack
 .optimiz
@@ -907,32 +907,32 @@
 rc/js/main.js')%0A
-
 %09%09.pipe(webpack(
@@ -930,16 +930,22 @@
 (webpack
+Stream
 (prod_co

Use webpack module