add build:ci script
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
"start": "yarn --cwd ./docs start",
|
||||
"build:docs": "yarn --cwd ./docs build",
|
||||
"build:packages": "yarn clean:packages && rollup -c",
|
||||
"build:ci": "yarn clean:packages && rollup -c --ci",
|
||||
"clean:packages": "rm -rf ./packages/*/dist",
|
||||
"lint": "eslint --quiet --no-error-on-unmatched-pattern ./",
|
||||
"test:open": "cypress open --project tests",
|
||||
|
||||
@@ -24,10 +24,11 @@ async function build(commandLineArgs) {
|
||||
const config = []
|
||||
|
||||
// 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)
|
||||
|
||||
// prevent rollup warning
|
||||
delete commandLineArgs.ci
|
||||
delete commandLineArgs.scope
|
||||
delete commandLineArgs.ignore
|
||||
|
||||
@@ -90,6 +91,7 @@ async function build(commandLineArgs) {
|
||||
plugins,
|
||||
})
|
||||
|
||||
if (!ci) {
|
||||
config.push({
|
||||
input,
|
||||
output: [
|
||||
@@ -103,7 +105,7 @@ async function build(commandLineArgs) {
|
||||
},
|
||||
},
|
||||
],
|
||||
externals: [
|
||||
external: [
|
||||
'vue',
|
||||
],
|
||||
plugins: [
|
||||
@@ -111,6 +113,7 @@ async function build(commandLineArgs) {
|
||||
terser(),
|
||||
],
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
return config
|
||||
|
||||
Reference in New Issue
Block a user