mirror of https://github.com/ElemeFE/element
update release scripts
parent
07acf66a69
commit
cee3154304
|
@ -42,11 +42,10 @@ if [ "$TRAVIS_TAG" ]; then
|
||||||
|
|
||||||
SUB_FOLDER='2.0'
|
SUB_FOLDER='2.0'
|
||||||
mkdir $SUB_FOLDER
|
mkdir $SUB_FOLDER
|
||||||
# rm -rf *.js *.css *.map static
|
rm -rf *.js *.css *.map static
|
||||||
rm -rf $SUB_FOLDER/**
|
rm -rf $SUB_FOLDER/**
|
||||||
# cp -rf ../../examples/element-ui/** .
|
cp -rf ../../examples/element-ui/** .
|
||||||
cp -rf ../../examples/element-ui/** $SUB_FOLDER/
|
cp -rf ../../examples/element-ui/** $SUB_FOLDER/
|
||||||
cp -rf ../../examples/element-ui/versions.json .
|
|
||||||
git add -A .
|
git add -A .
|
||||||
git commit -m "$TRAVIS_COMMIT_MSG"
|
git commit -m "$TRAVIS_COMMIT_MSG"
|
||||||
git push origin gh-pages
|
git push origin gh-pages
|
||||||
|
|
|
@ -7,11 +7,10 @@ git clone -b gh-pages https://github.com/ElemeFE/element.git && cd element
|
||||||
# build sub folder
|
# build sub folder
|
||||||
SUB_FOLDER='2.0'
|
SUB_FOLDER='2.0'
|
||||||
mkdir $SUB_FOLDER
|
mkdir $SUB_FOLDER
|
||||||
# rm -rf *.js *.css *.map static
|
rm -rf *.js *.css *.map static
|
||||||
rm -rf $SUB_FOLDER/**
|
rm -rf $SUB_FOLDER/**
|
||||||
# cp -rf ../../examples/element-ui/** .
|
cp -rf ../../examples/element-ui/** .
|
||||||
cp -rf ../../examples/element-ui/** $SUB_FOLDER/
|
cp -rf ../../examples/element-ui/** $SUB_FOLDER/
|
||||||
cp -rf ../../examples/element-ui/versions.json .
|
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
# deploy domestic site
|
# deploy domestic site
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
git checkout carbon
|
git checkout dev
|
||||||
|
|
||||||
if test -n "$(git status --porcelain)"; then
|
if test -n "$(git status --porcelain)"; then
|
||||||
echo 'Unclean working tree. Commit or stash changes first.' >&2;
|
echo 'Unclean working tree. Commit or stash changes first.' >&2;
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
git checkout master
|
||||||
|
git merge dev
|
||||||
|
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
set -e
|
set -e
|
||||||
echo "Enter release version: "
|
echo "Enter release version: "
|
||||||
|
@ -16,7 +19,12 @@ then
|
||||||
echo "Releasing theme-chalk $VERSION ..."
|
echo "Releasing theme-chalk $VERSION ..."
|
||||||
cd packages/theme-chalk
|
cd packages/theme-chalk
|
||||||
npm version $VERSION --message "[release] $VERSION"
|
npm version $VERSION --message "[release] $VERSION"
|
||||||
|
if [[ $VERSION =~ "beta" ]]
|
||||||
|
then
|
||||||
|
npm publish --tag beta
|
||||||
|
else
|
||||||
npm publish
|
npm publish
|
||||||
|
fi
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
# commit
|
# commit
|
||||||
|
@ -25,8 +33,16 @@ then
|
||||||
npm version $VERSION --message "[release] $VERSION"
|
npm version $VERSION --message "[release] $VERSION"
|
||||||
|
|
||||||
# publish
|
# publish
|
||||||
git push eleme carbon
|
git push eleme master
|
||||||
git push eleme refs/tags/v$VERSION
|
git push eleme refs/tags/v$VERSION
|
||||||
|
git checkout dev
|
||||||
|
git rebase master
|
||||||
|
git push eleme dev
|
||||||
|
|
||||||
npm publish --tag next
|
if [[ $VERSION =~ "beta" ]]
|
||||||
|
then
|
||||||
|
npm publish --tag beta
|
||||||
|
else
|
||||||
|
npm publish
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -178,6 +178,7 @@
|
||||||
|
|
||||||
<script type="text/babel">
|
<script type="text/babel">
|
||||||
import compoLang from '../i18n/component.json';
|
import compoLang from '../i18n/component.json';
|
||||||
|
import { version } from 'main/index.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
@ -200,10 +201,10 @@
|
||||||
goJsfiddle() {
|
goJsfiddle() {
|
||||||
const { script, html, style } = this.jsfiddle;
|
const { script, html, style } = this.jsfiddle;
|
||||||
const resourcesTpl = '<scr' + 'ipt src="//unpkg.com/vue/dist/vue.js"></scr' + 'ipt>' +
|
const resourcesTpl = '<scr' + 'ipt src="//unpkg.com/vue/dist/vue.js"></scr' + 'ipt>' +
|
||||||
'\n<scr' + 'ipt src="//unpkg.com/element-ui@next/lib/index.js"></scr' + 'ipt>';
|
'\n<scr' + `ipt src="//unpkg.com/element-ui@${ version }/lib/index.js"></scr` + 'ipt>';
|
||||||
let jsTpl = (script || '').replace(/export default/, 'var Main =').trim();
|
let jsTpl = (script || '').replace(/export default/, 'var Main =').trim();
|
||||||
let htmlTpl = `${resourcesTpl}\n<div id="app">\n${html.trim()}\n</div>`;
|
let htmlTpl = `${resourcesTpl}\n<div id="app">\n${html.trim()}\n</div>`;
|
||||||
let cssTpl = `@import url("//unpkg.com/element-ui@next/lib/theme-chalk/index.css");\n${(style || '').trim()}\n`;
|
let cssTpl = `@import url("//unpkg.com/element-ui@${ version }/lib/theme-chalk/index.css");\n${(style || '').trim()}\n`;
|
||||||
jsTpl = jsTpl
|
jsTpl = jsTpl
|
||||||
? jsTpl + '\nvar Ctor = Vue.extend(Main)\nnew Ctor().$mount(\'#app\')'
|
? jsTpl + '\nvar Ctor = Vue.extend(Main)\nnew Ctor().$mount(\'#app\')'
|
||||||
: 'new Vue().$mount(\'#app\')';
|
: 'new Vue().$mount(\'#app\')';
|
||||||
|
|
|
@ -390,7 +390,11 @@
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.onreadystatechange = _ => {
|
xhr.onreadystatechange = _ => {
|
||||||
if (xhr.readyState === 4 && xhr.status === 200) {
|
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||||
this.versions = JSON.parse(xhr.responseText);
|
const versions = JSON.parse(xhr.responseText);
|
||||||
|
this.versions = Object.keys(versions).slice(-2).reduce((prev, next) => {
|
||||||
|
prev[next] = versions[next];
|
||||||
|
return prev;
|
||||||
|
}, {});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
xhr.open('GET', '/versions.json');
|
xhr.open('GET', '/versions.json');
|
||||||
|
|
|
@ -4,21 +4,21 @@
|
||||||
Installing with npm is recommended and it works seamlessly with [webpack](https://webpack.js.org/).
|
Installing with npm is recommended and it works seamlessly with [webpack](https://webpack.js.org/).
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm i element-ui@next -S
|
npm i element-ui -S
|
||||||
```
|
```
|
||||||
|
|
||||||
### CDN
|
### CDN
|
||||||
Get the latest version from [unpkg.com/element-ui](https://unpkg.com/element-ui@next/) , and import JavaScript and CSS file in your page.
|
Get the latest version from [unpkg.com/element-ui](https://unpkg.com/element-ui/) , and import JavaScript and CSS file in your page.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<!-- import CSS -->
|
<!-- import CSS -->
|
||||||
<link rel="stylesheet" href="https://unpkg.com/element-ui@next/lib/theme-chalk/index.css">
|
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
||||||
<!-- import JavaScript -->
|
<!-- import JavaScript -->
|
||||||
<script src="https://unpkg.com/element-ui@next/lib/index.js"></script>
|
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Hello world
|
### Hello world
|
||||||
If you are using CDN, a hello-world page is easy with Element. [Online Demo](https://jsfiddle.net/leopoldthecuber/hzfpyvg6/1/)
|
If you are using CDN, a hello-world page is easy with Element. [Online Demo](https://jsfiddle.net/hzfpyvg6/14/)
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
@ -26,7 +26,7 @@ If you are using CDN, a hello-world page is easy with Element. [Online Demo](htt
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<!-- import CSS -->
|
<!-- import CSS -->
|
||||||
<link rel="stylesheet" href="https://unpkg.com/element-ui@next/lib/theme-chalk/index.css">
|
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
|
@ -39,7 +39,7 @@ If you are using CDN, a hello-world page is easy with Element. [Online Demo](htt
|
||||||
<!-- import Vue before Element -->
|
<!-- import Vue before Element -->
|
||||||
<script src="https://unpkg.com/vue/dist/vue.js"></script>
|
<script src="https://unpkg.com/vue/dist/vue.js"></script>
|
||||||
<!-- import JavaScript -->
|
<!-- import JavaScript -->
|
||||||
<script src="https://unpkg.com/element-ui@next/lib/index.js"></script>
|
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
||||||
<script>
|
<script>
|
||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
|
|
|
@ -6,123 +6,15 @@ This part walks you through the process of using Element in a webpack project.
|
||||||
|
|
||||||
Under construction.
|
Under construction.
|
||||||
|
|
||||||
### Config files
|
### Use vue-cli
|
||||||
|
|
||||||
Create a new project, and its structure should be
|
It is recommended to start a project using [vue-cli](https://github.com/vuejs/vue-cli):
|
||||||
```text
|
|
||||||
|- src/ --------------------- source code
|
|
||||||
|- App.vue
|
|
||||||
|- main.js -------------- entry
|
|
||||||
|- .babelrc ----------------- babel config
|
|
||||||
|- index.html --------------- HTML template
|
|
||||||
|- package.json ------------- npm config
|
|
||||||
|- README.md ---------------- readme
|
|
||||||
|- webpack.config.js -------- webpack config
|
|
||||||
```
|
|
||||||
|
|
||||||
Typical configurations for these config files are:
|
```shell
|
||||||
|
> npm i -g vue-cli
|
||||||
**.babelrc**
|
> mkdir my-project && cd my-project
|
||||||
```json
|
> vue init webpack
|
||||||
{
|
> npm i && npm i element-ui
|
||||||
"presets": ["vue-app"]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
**package.json**
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"name": "element-starter",
|
|
||||||
"scripts": {
|
|
||||||
"dev": "cross-env NODE_ENV=development webpack-dev-server --inline --hot --port 8086",
|
|
||||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"element-ui": "next",
|
|
||||||
"vue": "^2.4.2"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"babel-core": "^6.0.0",
|
|
||||||
"babel-loader": "^6.0.0",
|
|
||||||
"babel-preset-vue-app": "^1.2.0",
|
|
||||||
"cross-env": "^1.0.6",
|
|
||||||
"css-loader": "^0.23.1",
|
|
||||||
"file-loader": "^0.8.5",
|
|
||||||
"style-loader": "^0.13.1",
|
|
||||||
"vue-loader": "^9.8.0",
|
|
||||||
"webpack": "beta",
|
|
||||||
"webpack-dev-server": "beta"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
**webpack.config.js**
|
|
||||||
```javascript
|
|
||||||
var path = require('path')
|
|
||||||
var webpack = require('webpack')
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
entry: './src/main.js',
|
|
||||||
output: {
|
|
||||||
path: path.resolve(__dirname, './dist'),
|
|
||||||
publicPath: '/dist/',
|
|
||||||
filename: 'build.js'
|
|
||||||
},
|
|
||||||
module: {
|
|
||||||
loaders: [
|
|
||||||
{
|
|
||||||
test: /\.vue$/,
|
|
||||||
loader: 'vue-loader'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.js$/,
|
|
||||||
loader: 'babel-loader',
|
|
||||||
exclude: /node_modules/
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.css$/,
|
|
||||||
loader: 'style-loader!css-loader'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.(eot|svg|ttf|woff|woff2)(\?\S*)?$/,
|
|
||||||
loader: 'file-loader'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.(png|jpe?g|gif|svg)(\?\S*)?$/,
|
|
||||||
loader: 'file-loader',
|
|
||||||
query: {
|
|
||||||
name: '[name].[ext]?[hash]'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
devServer: {
|
|
||||||
historyApiFallback: true,
|
|
||||||
noInfo: true
|
|
||||||
},
|
|
||||||
devtool: '#eval-source-map'
|
|
||||||
}
|
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
|
||||||
module.exports.devtool = '#source-map'
|
|
||||||
// http://vue-loader.vuejs.org/en/workflow/production.html
|
|
||||||
module.exports.plugins = (module.exports.plugins || []).concat([
|
|
||||||
new webpack.DefinePlugin({
|
|
||||||
'process.env': {
|
|
||||||
NODE_ENV: '"production"'
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
|
||||||
compress: {
|
|
||||||
warnings: false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
])
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Import Element
|
### Import Element
|
||||||
|
|
|
@ -4,21 +4,21 @@
|
||||||
推荐使用 npm 的方式安装,它能更好地和 [webpack](https://webpack.js.org/) 打包工具配合使用。
|
推荐使用 npm 的方式安装,它能更好地和 [webpack](https://webpack.js.org/) 打包工具配合使用。
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm i element-ui@next -S
|
npm i element-ui -S
|
||||||
```
|
```
|
||||||
|
|
||||||
### CDN
|
### CDN
|
||||||
目前可以通过 [unpkg.com/element-ui](https://unpkg.com/element-ui@next/) 获取到最新版本的资源,在页面上引入 js 和 css 文件即可开始使用。
|
目前可以通过 [unpkg.com/element-ui](https://unpkg.com/element-ui/) 获取到最新版本的资源,在页面上引入 js 和 css 文件即可开始使用。
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<!-- 引入样式 -->
|
<!-- 引入样式 -->
|
||||||
<link rel="stylesheet" href="https://unpkg.com/element-ui@next/lib/theme-chalk/index.css">
|
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
||||||
<!-- 引入组件库 -->
|
<!-- 引入组件库 -->
|
||||||
<script src="https://unpkg.com/element-ui@next/lib/index.js"></script>
|
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Hello world
|
### Hello world
|
||||||
通过 CDN 的方式我们可以很容易地使用 Element 写出一个 Hello world 页面。[在线演示](https://jsfiddle.net/leopoldthecuber/hzfpyvg6/1/)
|
通过 CDN 的方式我们可以很容易地使用 Element 写出一个 Hello world 页面。[在线演示](https://jsfiddle.net/hzfpyvg6/14/)
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
@ -26,7 +26,7 @@ npm i element-ui@next -S
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<!-- 引入样式 -->
|
<!-- 引入样式 -->
|
||||||
<link rel="stylesheet" href="https://unpkg.com/element-ui@next/lib/theme-chalk/index.css">
|
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
|
@ -39,7 +39,7 @@ npm i element-ui@next -S
|
||||||
<!-- 先引入 Vue -->
|
<!-- 先引入 Vue -->
|
||||||
<script src="https://unpkg.com/vue/dist/vue.js"></script>
|
<script src="https://unpkg.com/vue/dist/vue.js"></script>
|
||||||
<!-- 引入组件库 -->
|
<!-- 引入组件库 -->
|
||||||
<script src="https://unpkg.com/element-ui@next/lib/index.js"></script>
|
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
||||||
<script>
|
<script>
|
||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
|
|
|
@ -6,123 +6,15 @@
|
||||||
|
|
||||||
整理中。
|
整理中。
|
||||||
|
|
||||||
### 配置文件
|
### 使用 vue-cli
|
||||||
|
|
||||||
新建项目,项目结构为
|
我们推荐使用 [vue-cli](https://github.com/vuejs/vue-cli) 初始化项目,命令如下:
|
||||||
```text
|
|
||||||
|- src/ --------------------- 项目源代码
|
|
||||||
|- App.vue
|
|
||||||
|- main.js -------------- 入口文件
|
|
||||||
|- .babelrc ----------------- babel 配置文件
|
|
||||||
|- index.html --------------- HTML 模板
|
|
||||||
|- package.json ------------- npm 配置文件
|
|
||||||
|- README.md ---------------- 项目帮助文档
|
|
||||||
|- webpack.config.js -------- webpack 配置文件
|
|
||||||
```
|
|
||||||
|
|
||||||
几个配置文件的典型配置如下:
|
```shell
|
||||||
|
> npm i -g vue-cli
|
||||||
**.babelrc**
|
> mkdir my-project && cd my-project
|
||||||
```json
|
> vue init webpack
|
||||||
{
|
> npm i && npm i element-ui
|
||||||
"presets": ["vue-app"]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
**package.json**
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"name": "element-starter",
|
|
||||||
"scripts": {
|
|
||||||
"dev": "cross-env NODE_ENV=development webpack-dev-server --inline --hot --port 8086",
|
|
||||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"element-ui": "next",
|
|
||||||
"vue": "^2.4.2"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"babel-core": "^6.0.0",
|
|
||||||
"babel-loader": "^6.0.0",
|
|
||||||
"babel-preset-vue-app": "^1.2.0",
|
|
||||||
"cross-env": "^1.0.6",
|
|
||||||
"css-loader": "^0.23.1",
|
|
||||||
"file-loader": "^0.8.5",
|
|
||||||
"style-loader": "^0.13.1",
|
|
||||||
"vue-loader": "^9.8.0",
|
|
||||||
"webpack": "beta",
|
|
||||||
"webpack-dev-server": "beta"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
**webpack.config.js**
|
|
||||||
```javascript
|
|
||||||
var path = require('path')
|
|
||||||
var webpack = require('webpack')
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
entry: './src/main.js',
|
|
||||||
output: {
|
|
||||||
path: path.resolve(__dirname, './dist'),
|
|
||||||
publicPath: '/dist/',
|
|
||||||
filename: 'build.js'
|
|
||||||
},
|
|
||||||
module: {
|
|
||||||
loaders: [
|
|
||||||
{
|
|
||||||
test: /\.vue$/,
|
|
||||||
loader: 'vue-loader'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.js$/,
|
|
||||||
loader: 'babel-loader',
|
|
||||||
exclude: /node_modules/
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.css$/,
|
|
||||||
loader: 'style-loader!css-loader'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.(eot|svg|ttf|woff|woff2)(\?\S*)?$/,
|
|
||||||
loader: 'file-loader'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.(png|jpe?g|gif|svg)(\?\S*)?$/,
|
|
||||||
loader: 'file-loader',
|
|
||||||
query: {
|
|
||||||
name: '[name].[ext]?[hash]'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
devServer: {
|
|
||||||
historyApiFallback: true,
|
|
||||||
noInfo: true
|
|
||||||
},
|
|
||||||
devtool: '#eval-source-map'
|
|
||||||
}
|
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
|
||||||
module.exports.devtool = '#source-map'
|
|
||||||
// http://vue-loader.vuejs.org/en/workflow/production.html
|
|
||||||
module.exports.plugins = (module.exports.plugins || []).concat([
|
|
||||||
new webpack.DefinePlugin({
|
|
||||||
'process.env': {
|
|
||||||
NODE_ENV: '"production"'
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
|
||||||
compress: {
|
|
||||||
warnings: false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
])
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### 引入 Element
|
### 引入 Element
|
||||||
|
|
Loading…
Reference in New Issue