From b105fe22ad7f62074d9dfe8be6706d488ddcdd49 Mon Sep 17 00:00:00 2001 From: RoCky Wu Date: Tue, 7 Jun 2016 07:20:47 +0800 Subject: [PATCH] v0.2.1 add `del` --- package.json | 3 ++- scripts/build.js | 3 ++- webpack.config.js | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 57aa7ba..5d11c0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-ripples", - "version": "0.2.0", + "version": "0.2.1", "description": "The ripple effect everything", "main": "dist/react-ripples.js", "scripts": { @@ -46,6 +46,7 @@ "babel-preset-stage-0": "^6.5.0", "chalk": "^1.1.3", "coveralls": "^2.11.9", + "del": "^2.2.0", "enzyme": "^2.3.0", "eslint": "^2.11.1", "gulp": "^3.9.1", diff --git a/scripts/build.js b/scripts/build.js index 54ad7f0..0041d10 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -1,10 +1,11 @@ import webpack from 'webpack' import webConf from '../webpack.config' - +import del from 'del' import gu from 'gulp' import rename from 'gulp-rename' import uglify from 'gulp-uglify' +del.sync('dist') webpack(webConf, (er, stats)=> { console.log(stats.toString({ colors: true diff --git a/webpack.config.js b/webpack.config.js index 22ef639..9f49529 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,5 @@ const webpack = require('webpack') +const pkg = require('./package.json') const webpackEnv = process.env.WEBPACK const isDemo = webpackEnv === 'demo' @@ -35,6 +36,11 @@ module.exports = { } : {} }, externals: isProd ? { + ...Object.keys(pkg.dependencies).reduce((o, dep)=> { + o[dep] = true + return o + }, {}), + react: { root: 'React', commonjs: 'React',