From 299c3c62399a0d147494906ee526ca0016b55175 Mon Sep 17 00:00:00 2001 From: Simon Egersand Date: Wed, 16 Nov 2016 00:01:16 +0100 Subject: [PATCH] Revert "Change build configuration" This reverts commit 46d4eee57fad380e852b1f45b67ec28127b2d342. --- gulpfile.js | 16 +++++----------- package.json | 1 - webpack.config.js | 4 +--- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 91b8a0c93..5176a4948 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,8 +1,7 @@ var gulp = require('gulp'), uglify = require('gulp-uglify'), insert = require('gulp-insert'), - webpack = require('gulp-webpack'), - sourcemaps = require('gulp-sourcemaps') + webpack = require('gulp-webpack') ; var packageName = 'react-datetime'; @@ -35,27 +34,22 @@ var handleError = function( err ){ }; function wp( config, minify ){ - var inputSrc = './Datetime.js'; - var destSrc = 'dist/'; - - var stream = gulp.src( inputSrc ) + var stream = gulp.src('./Datetime.js') .pipe( webpack( config ) ) - .pipe( sourcemaps.init() ) ; if( minify ){ stream = stream.pipe( uglify() ).on( 'error', handleError ); } - return stream.pipe( sourcemaps.write() ) - .pipe( insert.prepend( cr ) ) - .pipe( gulp.dest( destSrc ) ) + return stream.pipe( insert.prepend( cr ) ) + .pipe( gulp.dest('dist/') ) ; } gulp.task( 'build', function( callback ) { var config = getWPConfig( 'react-datetime' ); - config.devtool = 'cheap-module-source-map'; + config.devtool = '#eval'; wp( config ); config = getWPConfig( 'react-datetime.min' ); diff --git a/package.json b/package.json index 686694de3..5dc0dcb8a 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "gulp-insert": "^0.4.0", "gulp-uglify": "^1.2.0", "gulp-webpack": "^1.5.0", - "gulp-sourcemaps": "^1.6.0", "jsdom": "^7.0.2", "mocha": "^2.2.5", "moment": "2.14.1", diff --git a/webpack.config.js b/webpack.config.js index 4d12059f9..c0f00979a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,9 +2,7 @@ var webpack = require('webpack'); var plugins = [ new webpack.DefinePlugin({ - 'process.env': { - 'NODE_ENV': JSON.stringify('production') - } + 'process.env': { NODE_ENV: '"production"'} }) ];