mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[Doc] use cdn to speedup site
This commit is contained in:
parent
70a014e388
commit
7ae750ec46
@ -12,8 +12,8 @@ const tasks = [
|
||||
'node build/build-components.js',
|
||||
'node build/build-style.js',
|
||||
'node build/build-style-entry.js',
|
||||
'cross-env NODE_ENV=production webpack --color --config build/webpack.build.js',
|
||||
'cross-env NODE_ENV=production webpack -p --color --config build/webpack.build.js'
|
||||
'cross-env NODE_ENV=production webpack --color --config build/webpack.pkg.js',
|
||||
'cross-env NODE_ENV=production webpack -p --color --config build/webpack.pkg.js'
|
||||
];
|
||||
|
||||
tasks.forEach(task => {
|
||||
|
10
build/release-site.sh
Normal file
10
build/release-site.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env sh
|
||||
rm -rf docs/dist
|
||||
|
||||
npx cross-env NODE_ENV=production webpack --config build/webpack.doc.js
|
||||
|
||||
superman-cdn cdn /vant ./docs/dist/*.js
|
||||
|
||||
rm -rf docs/dist/*.js
|
||||
|
||||
gh-pages -d docs/dist --add
|
@ -1,5 +1,5 @@
|
||||
const path = require('path');
|
||||
const config = require('./webpack.dev.js');
|
||||
const config = require('./webpack.base.js');
|
||||
|
||||
const isMinify = process.argv.indexOf('-p') !== -1;
|
||||
|
@ -1,11 +1,11 @@
|
||||
const path = require('path');
|
||||
const config = require('./webpack.dev.js');
|
||||
const config = require('./webpack.base.js');
|
||||
|
||||
module.exports = Object.assign(config, {
|
||||
mode: 'production',
|
||||
output: {
|
||||
path: path.join(__dirname, '../docs/dist'),
|
||||
publicPath: 'https://youzan.github.io/vant/',
|
||||
publicPath: 'https://b.yzcdn.cn/vant/',
|
||||
filename: '[name].[hash:8].js',
|
||||
chunkFilename: 'async_[name].[chunkhash:8].js'
|
||||
}
|
@ -19,12 +19,12 @@
|
||||
"build:entry": "node build/build-entry.js",
|
||||
"build:changelog": "vant-doc changelog ./docs/markdown/changelog.generated.md --tag 2.0.0",
|
||||
"build:lib": "node build/build-lib.js",
|
||||
"build:site": "rm -rf docs/dist && cross-env NODE_ENV=production webpack --config build/webpack.doc.js && gh-pages -d docs/dist --add",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"test:clear-cache": "jest --clearCache",
|
||||
"test:coverage": "open test/coverage/index.html",
|
||||
"release": "sh build/release.sh"
|
||||
"release": "sh build/release-pkg.sh",
|
||||
"release-site": "sh build/release-site.sh"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user