webpack cdn config

This commit is contained in:
cookfront 2017-05-25 15:27:58 +08:00
parent 65da018a90
commit 64b780056a
4 changed files with 13 additions and 3 deletions

View File

@ -6,7 +6,7 @@ var devConfig = require('./webpack.config.dev.js');
module.exports = merge(devConfig, {
output: {
path: path.join(__dirname, '../docs/dist'),
publicPath: '/zanui/vue',
publicPath: 'https://b.yzcdn.cn/zanui/vue',
filename: '[name].[hash:8].js',
umdNamedDefine: true
},

View File

@ -124,6 +124,14 @@
<van-icon name="password-not-view"></van-icon>
<span>password-not-view</span>
</van-col>
<van-col span="8">
<van-icon name="wap-nav"></van-icon>
<span>wap-nav</span>
</van-col>
<van-col span="8">
<van-icon name="wap-home"></van-icon>
<span>wap-home</span>
</van-col>
</van-row>
</example-block></section></template>

View File

@ -4,7 +4,7 @@
</example-block><example-block title="带toolbar的Picker">
<van-picker :columns="pickerColumns" show-toolbar="" @change="handlePickerChange" @cancel="handlePickerCancel" @confirm="handlePickerConfirm"></van-picker>
<van-picker :title="title" :columns="pickerColumns" show-toolbar="" @change="handlePickerChange" @cancel="handlePickerCancel" @confirm="handlePickerConfirm"></van-picker>
@ -21,6 +21,7 @@ const citys = {
export default {
data() {
return {
title: '地区选择',
pickerColumns: [
{
values: Object.keys(citys),

View File

@ -19,7 +19,8 @@
"build:components": "webpack --progress --hide-modules --config build/webpack.components.js",
"build:vant": "webpack --progress --hide-modules --config build/webpack.build.js && webpack --progress --hide-modules --config build/webpack.build.min.js",
"build:example": "node build/genExamples.js",
"deploy": "npm run deploy:docs && gh-pages -d docs/dist --remote youzan && rimraf docs/dist",
"deploy": "npm run deploy:docs && npm run deploy:cdn && gh-pages -d docs/dist --remote youzan && rimraf docs/dist",
"deploy:cdn": "superman cdn /zanui/vue docs/dist/*.js docs/dist/*.css",
"deploy:docs": "rimraf docs/dist && npm run build:example && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.config.prod.js",
"dist": "npm run clean && npm run build:file && npm run lint && npm run build:vant && npm run build:components && npm run build:utils && npm run build:vant-css",
"clean": "rimraf lib && rimraf packages/*/lib",