Simon Egersand
2016-11-16 299c3c62399a0d147494906ee526ca0016b55175
Revert "Change build configuration"

This reverts commit 46d4eee57fad380e852b1f45b67ec28127b2d342.
3 files modified
21 ■■■■ changed files
gulpfile.js 16 ●●●●● patch | view | raw | blame | history
package.json 1 ●●●● patch | view | raw | blame | history
webpack.config.js 4 ●●● patch | view | raw | blame | history
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 @@
};
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' );
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",
webpack.config.js
@@ -2,9 +2,7 @@
var plugins = [
  new webpack.DefinePlugin({
    'process.env': {
        'NODE_ENV': JSON.stringify('production')
    }
        'process.env': { NODE_ENV: '"production"'}
  })
];