add build:ci script
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
"start": "yarn --cwd ./docs start",
|
"start": "yarn --cwd ./docs start",
|
||||||
"build:docs": "yarn --cwd ./docs build",
|
"build:docs": "yarn --cwd ./docs build",
|
||||||
"build:packages": "yarn clean:packages && rollup -c",
|
"build:packages": "yarn clean:packages && rollup -c",
|
||||||
|
"build:ci": "yarn clean:packages && rollup -c --ci",
|
||||||
"clean:packages": "rm -rf ./packages/*/dist",
|
"clean:packages": "rm -rf ./packages/*/dist",
|
||||||
"lint": "eslint --quiet --no-error-on-unmatched-pattern ./",
|
"lint": "eslint --quiet --no-error-on-unmatched-pattern ./",
|
||||||
"test:open": "cypress open --project tests",
|
"test:open": "cypress open --project tests",
|
||||||
|
|||||||
@@ -24,10 +24,11 @@ async function build(commandLineArgs) {
|
|||||||
const config = []
|
const config = []
|
||||||
|
|
||||||
// Support --scope and --ignore globs if passed in via commandline
|
// Support --scope and --ignore globs if passed in via commandline
|
||||||
const { scope, ignore } = minimist(process.argv.slice(2))
|
const { scope, ignore, ci } = minimist(process.argv.slice(2))
|
||||||
const packages = await getSortedPackages(scope, ignore)
|
const packages = await getSortedPackages(scope, ignore)
|
||||||
|
|
||||||
// prevent rollup warning
|
// prevent rollup warning
|
||||||
|
delete commandLineArgs.ci
|
||||||
delete commandLineArgs.scope
|
delete commandLineArgs.scope
|
||||||
delete commandLineArgs.ignore
|
delete commandLineArgs.ignore
|
||||||
|
|
||||||
@@ -90,27 +91,29 @@ async function build(commandLineArgs) {
|
|||||||
plugins,
|
plugins,
|
||||||
})
|
})
|
||||||
|
|
||||||
config.push({
|
if (!ci) {
|
||||||
input,
|
config.push({
|
||||||
output: [
|
input,
|
||||||
{
|
output: [
|
||||||
name,
|
{
|
||||||
file: path.join(basePath, unpkg),
|
name,
|
||||||
format: 'umd',
|
file: path.join(basePath, unpkg),
|
||||||
sourcemap: true,
|
format: 'umd',
|
||||||
globals: {
|
sourcemap: true,
|
||||||
vue: 'Vue',
|
globals: {
|
||||||
|
vue: 'Vue',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
],
|
||||||
],
|
external: [
|
||||||
externals: [
|
'vue',
|
||||||
'vue',
|
],
|
||||||
],
|
plugins: [
|
||||||
plugins: [
|
...plugins,
|
||||||
...plugins,
|
terser(),
|
||||||
terser(),
|
],
|
||||||
],
|
})
|
||||||
})
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
|||||||
Reference in New Issue
Block a user