diff --git a/build/webpack.config.js b/build/webpack.config.js index 0bbed1299..4ddf3aa42 100644 --- a/build/webpack.config.js +++ b/build/webpack.config.js @@ -8,6 +8,7 @@ var ProgressBarPlugin = require('progress-bar-webpack-plugin'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); +var FaviconsWebpackPlugin = require('favicons-webpack-plugin'); var StyleExtractPlugin; if (process.env.NODE_ENV === 'production') { @@ -190,6 +191,39 @@ if (process.env.NODE_ENV === 'production') { new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', minChunks: Infinity + }), + new FaviconsWebpackPlugin({ + // Your source logo + logo: path.join(__dirname, '../docs/assets/ZanUIlogo256x256.png'), + // The prefix for all image files (might be a folder or a name) + prefix: 'favico-[hash]-', + // Emit all stats of the generated icons + // emitStats: false, + // The name of the json containing all favicon information + // statsFilename: 'iconstats-[hash].json', + // Generate a cache file with control hashes and + // don't rebuild the favicons until those hashes change + persistentCache: false, + // Inject the html into the html-webpack-plugin + inject: true, + // favicon background color (see https://github.com/haydenbleasel/favicons#usage) + background: '#fff', + // favicon app title (see https://github.com/haydenbleasel/favicons#usage) + title: 'Vant', + + // which icons should be generated (see https://github.com/haydenbleasel/favicons#usage) + icons: { + android: true, + appleIcon: true, + appleStartup: true, + coast: false, + favicons: true, + firefox: true, + opengraph: false, + twitter: false, + yandex: false, + windows: false + } }) ]); } diff --git a/docs/assets/ZanUIlogo256x256.png b/docs/assets/ZanUIlogo256x256.png new file mode 100644 index 000000000..0b32f4338 Binary files /dev/null and b/docs/assets/ZanUIlogo256x256.png differ diff --git a/docs/examples-docs/install.md b/docs/examples-docs/install.md deleted file mode 100644 index 9922b6658..000000000 --- a/docs/examples-docs/install.md +++ /dev/null @@ -1,7 +0,0 @@ -## 安装 - -### ynpm安装 - -```shell -npm i vant -S -``` diff --git a/docs/examples-docs/quickstart.md b/docs/examples-docs/quickstart.md index dcae8a179..a5985cdfa 100644 --- a/docs/examples-docs/quickstart.md +++ b/docs/examples-docs/quickstart.md @@ -1,6 +1,17 @@ -## 快速上手 +## Vant -### 完整引入 +一套`Vue 2.0`的基础组件。 +A collection of essential UI components written with Vue 2.0. + +### 安装 + +```shell +npm i vant -S +``` + +### 引入组件 + +#### 完整引入 ```javascript import Vue from 'vue'; @@ -10,7 +21,7 @@ import 'vant/lib/vant-css/index.css'; Vue.use(ZanUI); ``` -### 按需引入 +#### 按需引入 ```javascript import Vue from 'vue'; diff --git a/docs/src/index.js b/docs/src/index.js index ee3383740..c231831b2 100644 --- a/docs/src/index.js +++ b/docs/src/index.js @@ -30,7 +30,7 @@ Vue.use(ZanUI.Lazyload, { const routesConfig = routes(navConfig); routesConfig.push({ path: '/', - redirect: '/component/install' + redirect: '/component/quickstart' }); const router = new VueRouter({ diff --git a/docs/src/nav.config.js b/docs/src/nav.config.js index 661a5d631..a8ee5ae09 100644 --- a/docs/src/nav.config.js +++ b/docs/src/nav.config.js @@ -6,10 +6,6 @@ module.exports = { "groups": [ { "list": [ - { - "path": "/install", - "title": "安装" - }, { "path": "/quickstart", "title": "快速上手" @@ -19,7 +15,7 @@ module.exports = { ] }, { - "name": "ZanUI组件", + "name": "Vant组件", "showInMobile": true, "groups": [ { diff --git a/package.json b/package.json index eb379ed94..903b8096f 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,7 @@ "decamelize": "^1.2.0", "eslint-loader": "^1.7.1", "extract-text-webpack-plugin": "^2.0.0-beta.5", + "favicons-webpack-plugin": "0.0.7", "felint": "^0.5.0-alpha.3", "file-loader": "^0.9.0", "file-save": "^0.2.0",