mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 06:03:22 +08:00
add build:ci script
This commit is contained in:
parent
0ac228156c
commit
960368db0e
@ -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,27 +91,29 @@ async function build(commandLineArgs) {
|
||||
plugins,
|
||||
})
|
||||
|
||||
config.push({
|
||||
input,
|
||||
output: [
|
||||
{
|
||||
name,
|
||||
file: path.join(basePath, unpkg),
|
||||
format: 'umd',
|
||||
sourcemap: true,
|
||||
globals: {
|
||||
vue: 'Vue',
|
||||
if (!ci) {
|
||||
config.push({
|
||||
input,
|
||||
output: [
|
||||
{
|
||||
name,
|
||||
file: path.join(basePath, unpkg),
|
||||
format: 'umd',
|
||||
sourcemap: true,
|
||||
globals: {
|
||||
vue: 'Vue',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
externals: [
|
||||
'vue',
|
||||
],
|
||||
plugins: [
|
||||
...plugins,
|
||||
terser(),
|
||||
],
|
||||
})
|
||||
],
|
||||
external: [
|
||||
'vue',
|
||||
],
|
||||
plugins: [
|
||||
...plugins,
|
||||
terser(),
|
||||
],
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
return config
|
||||
|
Loading…
Reference in New Issue
Block a user