add favicons

This commit is contained in:
cookfront
2017-04-20 11:55:29 +08:00
parent 555ea1fe5d
commit 5a1027ee3c
7 changed files with 51 additions and 16 deletions

View File

@@ -8,6 +8,7 @@ var ProgressBarPlugin = require('progress-bar-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin'); var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin'); var HtmlWebpackPlugin = require('html-webpack-plugin');
var OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); var OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
var FaviconsWebpackPlugin = require('favicons-webpack-plugin');
var StyleExtractPlugin; var StyleExtractPlugin;
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
@@ -190,6 +191,39 @@ if (process.env.NODE_ENV === 'production') {
new webpack.optimize.CommonsChunkPlugin({ new webpack.optimize.CommonsChunkPlugin({
name: 'vendor', name: 'vendor',
minChunks: Infinity 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
}
}) })
]); ]);
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

@@ -1,7 +0,0 @@
## 安装
### ynpm安装
```shell
npm i vant -S
```

View File

@@ -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 ```javascript
import Vue from 'vue'; import Vue from 'vue';
@@ -10,7 +21,7 @@ import 'vant/lib/vant-css/index.css';
Vue.use(ZanUI); Vue.use(ZanUI);
``` ```
### 按需引入 #### 按需引入
```javascript ```javascript
import Vue from 'vue'; import Vue from 'vue';

View File

@@ -30,7 +30,7 @@ Vue.use(ZanUI.Lazyload, {
const routesConfig = routes(navConfig); const routesConfig = routes(navConfig);
routesConfig.push({ routesConfig.push({
path: '/', path: '/',
redirect: '/component/install' redirect: '/component/quickstart'
}); });
const router = new VueRouter({ const router = new VueRouter({

View File

@@ -6,10 +6,6 @@ module.exports = {
"groups": [ "groups": [
{ {
"list": [ "list": [
{
"path": "/install",
"title": "安装"
},
{ {
"path": "/quickstart", "path": "/quickstart",
"title": "快速上手" "title": "快速上手"
@@ -19,7 +15,7 @@ module.exports = {
] ]
}, },
{ {
"name": "ZanUI组件", "name": "Vant组件",
"showInMobile": true, "showInMobile": true,
"groups": [ "groups": [
{ {

View File

@@ -72,6 +72,7 @@
"decamelize": "^1.2.0", "decamelize": "^1.2.0",
"eslint-loader": "^1.7.1", "eslint-loader": "^1.7.1",
"extract-text-webpack-plugin": "^2.0.0-beta.5", "extract-text-webpack-plugin": "^2.0.0-beta.5",
"favicons-webpack-plugin": "0.0.7",
"felint": "^0.5.0-alpha.3", "felint": "^0.5.0-alpha.3",
"file-loader": "^0.9.0", "file-loader": "^0.9.0",
"file-save": "^0.2.0", "file-save": "^0.2.0",