Browse Source

Merge pull request #110 from micooz/master

refactor webpack configs
DIYgod 8 years ago
parent
commit
c1828fe0cf
11 changed files with 361 additions and 129 deletions
  1. 9 10
      demo/index.html
  2. 0 0
      demo/plugin/flv.min.js
  3. 0 0
      demo/plugin/hls.min.js
  4. 5 4
      package.json
  5. 0 5
      postcss.config.js
  6. 1 0
      src/index.js
  7. 0 91
      webpack.config.js
  8. 108 0
      webpack/dev.config.js
  9. 5 0
      webpack/postcss.config.js
  10. 110 0
      webpack/prod.config.js
  11. 123 19
      yarn.lock

+ 9 - 10
demo/index.html

@@ -7,10 +7,9 @@
     <link rel="stylesheet" href="https://unpkg.com/github-markdown-css">
     <link rel="stylesheet" href="https://cdn.bootcss.com/highlight.js/9.12.0/styles/github-gist.min.css">
     <link rel="stylesheet" href="demo.css">
-    <link rel="stylesheet" href="../dist/DPlayer.min.css">
-    <script src="../plugin/flv.min.js"></script>
-    <script src="../plugin/hls.min.js"></script>
-    <script src="../dist/DPlayer.min.js"></script>
+    <script src="plugin/flv.min.js"></script>
+    <script src="plugin/hls.min.js"></script>
+    <script src="DPlayer.js"></script>
 </head>
 <body class="markdown-body">
     <p align="center">
@@ -56,9 +55,9 @@
         </script>
     </div>
     <div class="highlight highlight-middle highlight-html">
-        <pre><code class="html">&lt;link rel=&quot;stylesheet&quot; href=&quot;dist/DPlayer.min.css&quot;&gt;
+        <pre><code class="html">&lt;link rel=&quot;stylesheet&quot; href=&quot;DPlayer.min.css&quot;&gt;
 &lt;div id=&quot;dplayer&quot;&gt;&lt;/div&gt;
-&lt;script src=&quot;dist/DPlayer.min.js&quot;&gt;&lt;/script&gt;</code></pre>
+&lt;script src=&quot;DPlayer.min.js&quot;&gt;&lt;/script&gt;</code></pre>
     </div>
     <div class="highlight highlight-js"><pre><code class="js">var dp = new DPlayer({
     element: document.getElementById('dplayer'),
@@ -216,10 +215,10 @@
         </script>
     </div>
     <div class="highlight highlight-middle highlight-html">
-        <pre><code class="html">&lt;link rel=&quot;stylesheet&quot; href=&quot;dist/DPlayer.min.css&quot;&gt;
+        <pre><code class="html">&lt;link rel=&quot;stylesheet&quot; href=&quot;DPlayer.min.css&quot;&gt;
 &lt;div id=&quot;dplayer&quot;&gt;&lt;/div&gt;
 &lt;script src=&quot;plugin/hls.min.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;dist/DPlayer.min.js&quot;&gt;&lt;/script&gt;</code></pre>
+&lt;script src=&quot;DPlayer.min.js&quot;&gt;&lt;/script&gt;</code></pre>
     </div>
     <div class="highlight highlight-js">
         <pre><code class="js">var dp = new DPlayer({
@@ -245,10 +244,10 @@
         </script>
     </div>
     <div class="highlight highlight-middle highlight-html">
-        <pre><code class="html">&lt;link rel=&quot;stylesheet&quot; href=&quot;dist/DPlayer.min.css&quot;&gt;
+        <pre><code class="html">&lt;link rel=&quot;stylesheet&quot; href=&quot;DPlayer.min.css&quot;&gt;
 &lt;div id=&quot;dplayer&quot;&gt;&lt;/div&gt;
 &lt;script src=&quot;plugin/flv.min.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;dist/DPlayer.min.js&quot;&gt;&lt;/script&gt;</code></pre>
+&lt;script src=&quot;DPlayer.min.js&quot;&gt;&lt;/script&gt;</code></pre>
     </div>
     <div class="highlight highlight-js">
         <pre><code class="js">var dp = new DPlayer({

+ 0 - 0
plugin/flv.min.js → demo/plugin/flv.min.js


+ 0 - 0
plugin/hls.min.js → demo/plugin/hls.min.js


+ 5 - 4
package.json

@@ -5,9 +5,10 @@
   "main": "dist/DPlayer.min.js",
   "style": "dist/DPlayer.min.css",
   "scripts": {
-    "test": "webpack",
-    "build": "webpack",
-    "dev": "cross-env WEBPACK_ENV=dev webpack-dev-server --hot --progress --inline --host 0.0.0.0"
+    "start": "npm run dev",
+    "build": "cross-env NODE_ENV=production webpack --config webpack/prod.config.js --progress --display-error-details --colors",
+    "dev": "cross-env NODE_ENV=development webpack-dev-server --config webpack/dev.config.js --watch --colors",
+    "test": "eslint src webpack"
   },
   "files": [
     "dist"
@@ -32,7 +33,7 @@
     "autoprefixer": "^7.1.1",
     "babel-core": "^6.24.1",
     "babel-loader": "^7.1.1",
-    "babel-preset-es2015": "^6.24.1",
+    "babel-preset-env": "^1.6.0",
     "cross-env": "^5.0.1",
     "css-loader": "^0.28.0",
     "eslint": "^4.1.0",

+ 0 - 5
postcss.config.js

@@ -1,5 +0,0 @@
-module.exports = {
-    plugins: [
-        require('autoprefixer')
-    ]
-}

+ 1 - 0
src/index.js

@@ -0,0 +1 @@
+module.exports = require('./DPlayer');

+ 0 - 91
webpack.config.js

@@ -1,91 +0,0 @@
-var webpack = require('webpack');
-var path = require('path');
-var autoprefixer = require('autoprefixer');
-var ExtractTextPlugin = require('extract-text-webpack-plugin');
-
-var libraryName = 'DPlayer';
-var env = process.env.WEBPACK_ENV;
-var ROOT_PATH = path.resolve(__dirname);
-var APP_PATH = path.resolve(ROOT_PATH, 'src');
-var BUILD_PATH = path.resolve(ROOT_PATH, 'dist');
-
-var dev = env === 'dev';
-var plugins = [].concat(dev ? [] : [
-    new webpack.optimize.UglifyJsPlugin({
-        sourceMap: true,
-        compressor: {
-            warnings: false,
-            conditionals: true,
-            unused: true,
-            comparisons: true,
-            sequences: true,
-            dead_code: true,
-            evaluate: true,
-            if_return: true,
-            join_vars: true,
-            negate_iife: false
-        },
-        output: {
-            comments: false
-        }
-    }),
-    new ExtractTextPlugin(`${libraryName}.min.css`)
-]);
-
-module.exports = {
-    entry: './src/' + libraryName + '.js',
-
-    output: {
-        path: BUILD_PATH,
-        filename: libraryName + '.min.js',
-        library: libraryName,
-        libraryTarget: 'umd',
-        umdNamedDefine: true
-    },
-
-    devtool: dev ? 'eval-source-map' : 'source-map',
-
-    devServer: {
-        publicPath: "/dist/",
-    },
-
-    module: {
-        rules: [
-            {
-                enforce: 'pre',
-                test: /\.js$/,
-                loader: 'eslint-loader',
-                include: APP_PATH,
-                options: {
-                    configFile: './.eslintrc'
-                },
-            },
-            {
-                test: /\.js$/,
-                loader: 'template-string-optimize-loader',
-                include: APP_PATH,
-            },
-            {
-                test: /\.js$/,
-                loader: 'babel-loader',
-                include: APP_PATH,
-                options: {
-                    presets: ['es2015']
-                }
-            },
-            {
-                test: /\.scss$/,
-                use: dev ? ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'] : ExtractTextPlugin.extract({
-                    use: ['css-loader?minimize&-autoprefixer', 'postcss-loader', 'sass-loader']
-                }),
-                include: APP_PATH
-            },
-            {
-                test: /\.(png|jpg)$/,
-                loader: 'url-loader?limit=40000'
-            }
-        ]
-    },
-
-    plugins: plugins
-};

+ 108 - 0
webpack/dev.config.js

@@ -0,0 +1,108 @@
+/* eslint-disable no-undef */
+const path = require('path');
+const webpack = require('webpack');
+
+module.exports = {
+
+    devtool: 'cheap-module-source-map',
+
+    entry: {
+        'DPlayer': './src/index.js'
+    },
+
+    output: {
+        path: path.resolve(__dirname, '..', 'dist'),
+        filename: '[name].js',
+        library: '[name]',
+        libraryTarget: 'umd',
+        umdNamedDefine: true,
+        publicPath: '/'
+    },
+
+    resolve: {
+        modules: ['node_modules'],
+        extensions: ['.js', '.scss']
+    },
+
+    module: {
+        strictExportPresence: true,
+        rules: [
+            {
+                test: /\.js$/,
+                enforce: 'pre',
+                loader: require.resolve('eslint-loader'),
+                include: path.resolve(__dirname, '../src'),
+            },
+            {
+                test: /\.js$/,
+                use: [
+                    {
+                        loader: require.resolve('babel-loader'),
+                        options: {
+                            cacheDirectory: true,
+                            presets: ['env']
+                        }
+                    }
+                ]
+            },
+            {
+                test: /\.scss$/,
+                use: [
+                    require.resolve('style-loader'),
+                    {
+                        loader: require.resolve('css-loader'),
+                        options: {
+                            importLoaders: 1
+                        }
+                    },
+                    {
+                        loader: require.resolve('postcss-loader'),
+                        options: {
+                            config: {
+                                path: path.join(__dirname, 'postcss.config.js')
+                            }
+                        }
+                    },
+                    require.resolve('sass-loader')
+                ]
+            },
+            {
+                test: /\.(png|jpg)$/,
+                loader: require.resolve('url-loader'),
+                options: {
+                    'limit': 40000
+                }
+            }
+        ]
+    },
+
+    devServer: {
+        compress: true,
+        contentBase: path.resolve(__dirname, '..', 'demo'),
+        clientLogLevel: 'none',
+        quiet: false,
+        open: true,
+        historyApiFallback: {
+            disableDotRule: true
+        },
+        watchOptions: {
+            ignored: /node_modules/
+        }
+    },
+
+    plugins: [
+        new webpack.NamedModulesPlugin()
+    ],
+
+    node: {
+        dgram: 'empty',
+        fs: 'empty',
+        net: 'empty',
+        tls: 'empty'
+    },
+
+    performance: {
+        hints: false
+    }
+
+};

+ 5 - 0
webpack/postcss.config.js

@@ -0,0 +1,5 @@
+module.exports = {
+    plugins: {
+        'autoprefixer': {}
+    }
+};

+ 110 - 0
webpack/prod.config.js

@@ -0,0 +1,110 @@
+/* eslint-disable no-undef */
+const path = require('path');
+const webpack = require('webpack');
+const ExtractTextPlugin = require('extract-text-webpack-plugin');
+
+module.exports = {
+
+    bail: true,
+
+    devtool: 'source-map',
+
+    entry: {
+        'DPlayer': './src/index.js'
+    },
+
+    output: {
+        path: path.resolve(__dirname, '..', 'dist'),
+        filename: '[name].min.js',
+        library: '[name]',
+        libraryTarget: 'umd',
+        umdNamedDefine: true,
+        publicPath: '/'
+    },
+
+    resolve: {
+        modules: ['node_modules'],
+        extensions: ['.js', '.scss']
+    },
+
+    module: {
+        strictExportPresence: true,
+        rules: [
+            {
+                test: /\.js$/,
+                enforce: 'pre',
+                loader: require.resolve('eslint-loader'),
+                include: path.resolve(__dirname, '../src'),
+            },
+            {
+                test: /\.js$/,
+                use: [
+                    require.resolve('template-string-optimize-loader'),
+                    {
+                        loader: require.resolve('babel-loader'),
+                        options: {
+                            compact: true,
+                            presets: ['env']
+                        }
+                    }
+                ]
+            },
+            {
+                test: /\.scss$/,
+                use: ExtractTextPlugin.extract({
+                    fallback: require.resolve('style-loader'),
+                    use: [
+                        {
+                            loader: require.resolve('css-loader'),
+                            options: {
+                                importLoaders: 1,
+                                minimize: true,
+                                sourceMap: true
+                            }
+                        },
+                        {
+                            loader: require.resolve('postcss-loader'),
+                            options: {
+                                config: {
+                                    path: path.join(__dirname, 'postcss.config.js')
+                                }
+                            }
+                        },
+                        require.resolve('sass-loader')
+                    ]
+                })
+            },
+            {
+                test: /\.(png|jpg)$/,
+                loader: require.resolve('url-loader'),
+                options: {
+                    'limit': 40000
+                }
+            }
+        ]
+    },
+
+    plugins: [
+        new webpack.optimize.UglifyJsPlugin({
+            compress: {
+                warnings: false
+            },
+            output: {
+                comments: false,
+                ascii_only: true
+            },
+            sourceMap: true
+        }),
+        new ExtractTextPlugin({
+            filename: '[name].min.css'
+        })
+    ],
+
+    node: {
+        dgram: 'empty',
+        fs: 'empty',
+        net: 'empty',
+        tls: 'empty',
+    }
+
+};

+ 123 - 19
yarn.lock

@@ -276,6 +276,14 @@ babel-generator@^6.24.1:
     source-map "^0.5.0"
     trim-right "^1.0.1"
 
+babel-helper-builder-binary-assignment-operator-visitor@^6.24.1:
+  version "6.24.1"
+  resolved "http://registry.npm.taobao.org/babel-helper-builder-binary-assignment-operator-visitor/download/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664"
+  dependencies:
+    babel-helper-explode-assignable-expression "^6.24.1"
+    babel-runtime "^6.22.0"
+    babel-types "^6.24.1"
+
 babel-helper-call-delegate@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-helper-call-delegate/download/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d"
@@ -294,6 +302,14 @@ babel-helper-define-map@^6.24.1:
     babel-types "^6.24.1"
     lodash "^4.2.0"
 
+babel-helper-explode-assignable-expression@^6.24.1:
+  version "6.24.1"
+  resolved "http://registry.npm.taobao.org/babel-helper-explode-assignable-expression/download/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa"
+  dependencies:
+    babel-runtime "^6.22.0"
+    babel-traverse "^6.24.1"
+    babel-types "^6.24.1"
+
 babel-helper-function-name@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-helper-function-name/download/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9"
@@ -333,6 +349,16 @@ babel-helper-regex@^6.24.1:
     babel-types "^6.24.1"
     lodash "^4.2.0"
 
+babel-helper-remap-async-to-generator@^6.24.1:
+  version "6.24.1"
+  resolved "http://registry.npm.taobao.org/babel-helper-remap-async-to-generator/download/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b"
+  dependencies:
+    babel-helper-function-name "^6.24.1"
+    babel-runtime "^6.22.0"
+    babel-template "^6.24.1"
+    babel-traverse "^6.24.1"
+    babel-types "^6.24.1"
+
 babel-helper-replace-supers@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-helper-replace-supers/download/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a"
@@ -371,6 +397,26 @@ babel-plugin-check-es2015-constants@^6.22.0:
   dependencies:
     babel-runtime "^6.22.0"
 
+babel-plugin-syntax-async-functions@^6.8.0:
+  version "6.13.0"
+  resolved "http://registry.npm.taobao.org/babel-plugin-syntax-async-functions/download/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
+
+babel-plugin-syntax-exponentiation-operator@^6.8.0:
+  version "6.13.0"
+  resolved "http://registry.npm.taobao.org/babel-plugin-syntax-exponentiation-operator/download/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de"
+
+babel-plugin-syntax-trailing-function-commas@^6.22.0:
+  version "6.22.0"
+  resolved "http://registry.npm.taobao.org/babel-plugin-syntax-trailing-function-commas/download/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3"
+
+babel-plugin-transform-async-to-generator@^6.22.0:
+  version "6.24.1"
+  resolved "http://registry.npm.taobao.org/babel-plugin-transform-async-to-generator/download/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761"
+  dependencies:
+    babel-helper-remap-async-to-generator "^6.24.1"
+    babel-plugin-syntax-async-functions "^6.8.0"
+    babel-runtime "^6.22.0"
+
 babel-plugin-transform-es2015-arrow-functions@^6.22.0:
   version "6.22.0"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-arrow-functions/download/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221"
@@ -383,7 +429,7 @@ babel-plugin-transform-es2015-block-scoped-functions@^6.22.0:
   dependencies:
     babel-runtime "^6.22.0"
 
-babel-plugin-transform-es2015-block-scoping@^6.24.1:
+babel-plugin-transform-es2015-block-scoping@^6.23.0, babel-plugin-transform-es2015-block-scoping@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-block-scoping/download/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576"
   dependencies:
@@ -393,7 +439,7 @@ babel-plugin-transform-es2015-block-scoping@^6.24.1:
     babel-types "^6.24.1"
     lodash "^4.2.0"
 
-babel-plugin-transform-es2015-classes@^6.24.1:
+babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-classes/download/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db"
   dependencies:
@@ -407,33 +453,33 @@ babel-plugin-transform-es2015-classes@^6.24.1:
     babel-traverse "^6.24.1"
     babel-types "^6.24.1"
 
-babel-plugin-transform-es2015-computed-properties@^6.24.1:
+babel-plugin-transform-es2015-computed-properties@^6.22.0, babel-plugin-transform-es2015-computed-properties@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-computed-properties/download/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3"
   dependencies:
     babel-runtime "^6.22.0"
     babel-template "^6.24.1"
 
-babel-plugin-transform-es2015-destructuring@^6.22.0:
+babel-plugin-transform-es2015-destructuring@^6.22.0, babel-plugin-transform-es2015-destructuring@^6.23.0:
   version "6.23.0"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-destructuring/download/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d"
   dependencies:
     babel-runtime "^6.22.0"
 
-babel-plugin-transform-es2015-duplicate-keys@^6.24.1:
+babel-plugin-transform-es2015-duplicate-keys@^6.22.0, babel-plugin-transform-es2015-duplicate-keys@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-duplicate-keys/download/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e"
   dependencies:
     babel-runtime "^6.22.0"
     babel-types "^6.24.1"
 
-babel-plugin-transform-es2015-for-of@^6.22.0:
+babel-plugin-transform-es2015-for-of@^6.22.0, babel-plugin-transform-es2015-for-of@^6.23.0:
   version "6.23.0"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-for-of/download/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691"
   dependencies:
     babel-runtime "^6.22.0"
 
-babel-plugin-transform-es2015-function-name@^6.24.1:
+babel-plugin-transform-es2015-function-name@^6.22.0, babel-plugin-transform-es2015-function-name@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-function-name/download/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b"
   dependencies:
@@ -447,7 +493,7 @@ babel-plugin-transform-es2015-literals@^6.22.0:
   dependencies:
     babel-runtime "^6.22.0"
 
-babel-plugin-transform-es2015-modules-amd@^6.24.1:
+babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-modules-amd/download/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154"
   dependencies:
@@ -455,7 +501,7 @@ babel-plugin-transform-es2015-modules-amd@^6.24.1:
     babel-runtime "^6.22.0"
     babel-template "^6.24.1"
 
-babel-plugin-transform-es2015-modules-commonjs@^6.24.1:
+babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-modules-commonjs/download/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe"
   dependencies:
@@ -464,7 +510,7 @@ babel-plugin-transform-es2015-modules-commonjs@^6.24.1:
     babel-template "^6.24.1"
     babel-types "^6.24.1"
 
-babel-plugin-transform-es2015-modules-systemjs@^6.24.1:
+babel-plugin-transform-es2015-modules-systemjs@^6.23.0, babel-plugin-transform-es2015-modules-systemjs@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-modules-systemjs/download/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23"
   dependencies:
@@ -472,7 +518,7 @@ babel-plugin-transform-es2015-modules-systemjs@^6.24.1:
     babel-runtime "^6.22.0"
     babel-template "^6.24.1"
 
-babel-plugin-transform-es2015-modules-umd@^6.24.1:
+babel-plugin-transform-es2015-modules-umd@^6.23.0, babel-plugin-transform-es2015-modules-umd@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-modules-umd/download/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468"
   dependencies:
@@ -480,14 +526,14 @@ babel-plugin-transform-es2015-modules-umd@^6.24.1:
     babel-runtime "^6.22.0"
     babel-template "^6.24.1"
 
-babel-plugin-transform-es2015-object-super@^6.24.1:
+babel-plugin-transform-es2015-object-super@^6.22.0, babel-plugin-transform-es2015-object-super@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-object-super/download/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d"
   dependencies:
     babel-helper-replace-supers "^6.24.1"
     babel-runtime "^6.22.0"
 
-babel-plugin-transform-es2015-parameters@^6.24.1:
+babel-plugin-transform-es2015-parameters@^6.23.0, babel-plugin-transform-es2015-parameters@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-parameters/download/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b"
   dependencies:
@@ -498,7 +544,7 @@ babel-plugin-transform-es2015-parameters@^6.24.1:
     babel-traverse "^6.24.1"
     babel-types "^6.24.1"
 
-babel-plugin-transform-es2015-shorthand-properties@^6.24.1:
+babel-plugin-transform-es2015-shorthand-properties@^6.22.0, babel-plugin-transform-es2015-shorthand-properties@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-shorthand-properties/download/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0"
   dependencies:
@@ -511,7 +557,7 @@ babel-plugin-transform-es2015-spread@^6.22.0:
   dependencies:
     babel-runtime "^6.22.0"
 
-babel-plugin-transform-es2015-sticky-regex@^6.24.1:
+babel-plugin-transform-es2015-sticky-regex@^6.22.0, babel-plugin-transform-es2015-sticky-regex@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-sticky-regex/download/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc"
   dependencies:
@@ -525,13 +571,13 @@ babel-plugin-transform-es2015-template-literals@^6.22.0:
   dependencies:
     babel-runtime "^6.22.0"
 
-babel-plugin-transform-es2015-typeof-symbol@^6.22.0:
+babel-plugin-transform-es2015-typeof-symbol@^6.22.0, babel-plugin-transform-es2015-typeof-symbol@^6.23.0:
   version "6.23.0"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-typeof-symbol/download/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372"
   dependencies:
     babel-runtime "^6.22.0"
 
-babel-plugin-transform-es2015-unicode-regex@^6.24.1:
+babel-plugin-transform-es2015-unicode-regex@^6.22.0, babel-plugin-transform-es2015-unicode-regex@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-es2015-unicode-regex/download/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9"
   dependencies:
@@ -539,7 +585,15 @@ babel-plugin-transform-es2015-unicode-regex@^6.24.1:
     babel-runtime "^6.22.0"
     regexpu-core "^2.0.0"
 
-babel-plugin-transform-regenerator@^6.24.1:
+babel-plugin-transform-exponentiation-operator@^6.22.0:
+  version "6.24.1"
+  resolved "http://registry.npm.taobao.org/babel-plugin-transform-exponentiation-operator/download/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e"
+  dependencies:
+    babel-helper-builder-binary-assignment-operator-visitor "^6.24.1"
+    babel-plugin-syntax-exponentiation-operator "^6.8.0"
+    babel-runtime "^6.22.0"
+
+babel-plugin-transform-regenerator@^6.22.0, babel-plugin-transform-regenerator@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-plugin-transform-regenerator/download/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418"
   dependencies:
@@ -552,6 +606,41 @@ babel-plugin-transform-strict-mode@^6.24.1:
     babel-runtime "^6.22.0"
     babel-types "^6.24.1"
 
+babel-preset-env@^1.6.0:
+  version "1.6.0"
+  resolved "http://registry.npm.taobao.org/babel-preset-env/download/babel-preset-env-1.6.0.tgz#2de1c782a780a0a5d605d199c957596da43c44e4"
+  dependencies:
+    babel-plugin-check-es2015-constants "^6.22.0"
+    babel-plugin-syntax-trailing-function-commas "^6.22.0"
+    babel-plugin-transform-async-to-generator "^6.22.0"
+    babel-plugin-transform-es2015-arrow-functions "^6.22.0"
+    babel-plugin-transform-es2015-block-scoped-functions "^6.22.0"
+    babel-plugin-transform-es2015-block-scoping "^6.23.0"
+    babel-plugin-transform-es2015-classes "^6.23.0"
+    babel-plugin-transform-es2015-computed-properties "^6.22.0"
+    babel-plugin-transform-es2015-destructuring "^6.23.0"
+    babel-plugin-transform-es2015-duplicate-keys "^6.22.0"
+    babel-plugin-transform-es2015-for-of "^6.23.0"
+    babel-plugin-transform-es2015-function-name "^6.22.0"
+    babel-plugin-transform-es2015-literals "^6.22.0"
+    babel-plugin-transform-es2015-modules-amd "^6.22.0"
+    babel-plugin-transform-es2015-modules-commonjs "^6.23.0"
+    babel-plugin-transform-es2015-modules-systemjs "^6.23.0"
+    babel-plugin-transform-es2015-modules-umd "^6.23.0"
+    babel-plugin-transform-es2015-object-super "^6.22.0"
+    babel-plugin-transform-es2015-parameters "^6.23.0"
+    babel-plugin-transform-es2015-shorthand-properties "^6.22.0"
+    babel-plugin-transform-es2015-spread "^6.22.0"
+    babel-plugin-transform-es2015-sticky-regex "^6.22.0"
+    babel-plugin-transform-es2015-template-literals "^6.22.0"
+    babel-plugin-transform-es2015-typeof-symbol "^6.23.0"
+    babel-plugin-transform-es2015-unicode-regex "^6.22.0"
+    babel-plugin-transform-exponentiation-operator "^6.22.0"
+    babel-plugin-transform-regenerator "^6.22.0"
+    browserslist "^2.1.2"
+    invariant "^2.2.2"
+    semver "^5.3.0"
+
 babel-preset-es2015@^6.24.1:
   version "6.24.1"
   resolved "http://registry.npm.taobao.org/babel-preset-es2015/download/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939"
@@ -756,6 +845,13 @@ browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6:
     caniuse-db "^1.0.30000639"
     electron-to-chromium "^1.2.7"
 
+browserslist@^2.1.2:
+  version "2.2.2"
+  resolved "http://registry.npm.taobao.org/browserslist/download/browserslist-2.2.2.tgz#e9b4618b8a01c193f9786beea09f6fd10dbe31c3"
+  dependencies:
+    caniuse-lite "^1.0.30000704"
+    electron-to-chromium "^1.3.16"
+
 browserslist@^2.1.3:
   version "2.1.4"
   resolved "http://registry.npm.taobao.org/browserslist/download/browserslist-2.1.4.tgz#cc526af4a1312b7d2e05653e56d0c8ab70c0e053"
@@ -837,6 +933,10 @@ caniuse-lite@^1.0.30000670:
   version "1.0.30000671"
   resolved "http://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30000671.tgz#c206c2f1a1feb34de46064407c4356818389bf1e"
 
+caniuse-lite@^1.0.30000704:
+  version "1.0.30000708"
+  resolved "http://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30000708.tgz#71dbf388c57f379b1bb66c89a890edc04c2509b6"
+
 caseless@~0.12.0:
   version "0.12.0"
   resolved "http://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
@@ -1358,6 +1458,10 @@ electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.11:
   version "1.3.11"
   resolved "http://registry.npm.taobao.org/electron-to-chromium/download/electron-to-chromium-1.3.11.tgz#744761df1d67b492b322ce9aa0aba5393260eb61"
 
+electron-to-chromium@^1.3.16:
+  version "1.3.16"
+  resolved "http://registry.npm.taobao.org/electron-to-chromium/download/electron-to-chromium-1.3.16.tgz#d0e026735754770901ae301a21664cba45d92f7d"
+
 elliptic@^6.0.0:
   version "6.4.0"
   resolved "http://registry.npm.taobao.org/elliptic/download/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df"
@@ -2188,7 +2292,7 @@ interpret@^1.0.0:
   version "1.0.3"
   resolved "http://registry.npm.taobao.org/interpret/download/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
 
-invariant@^2.2.0:
+invariant@^2.2.0, invariant@^2.2.2:
   version "2.2.2"
   resolved "http://registry.npm.taobao.org/invariant/download/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360"
   dependencies: