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,6 +91,7 @@ async function build(commandLineArgs) {
|
|||||||
plugins,
|
plugins,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (!ci) {
|
||||||
config.push({
|
config.push({
|
||||||
input,
|
input,
|
||||||
output: [
|
output: [
|
||||||
@@ -103,7 +105,7 @@ async function build(commandLineArgs) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
externals: [
|
external: [
|
||||||
'vue',
|
'vue',
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
@@ -111,6 +113,7 @@ async function build(commandLineArgs) {
|
|||||||
terser(),
|
terser(),
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
|||||||
Reference in New Issue
Block a user