build: add vue package
This commit is contained in:
3
scripts/bootstrap.js
vendored
3
scripts/bootstrap.js
vendored
@@ -9,6 +9,9 @@ const packagesDir = path.resolve(__dirname, '../packages')
|
||||
const files = fs.readdirSync(packagesDir)
|
||||
|
||||
files.forEach(shortName => {
|
||||
if (shortName === 'shared') {
|
||||
return
|
||||
}
|
||||
if (!fs.statSync(path.join(packagesDir, shortName)).isDirectory()) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -25,13 +25,14 @@ const { targets, fuzzyMatchTarget } = require('./utils')
|
||||
const args = require('minimist')(process.argv.slice(2))
|
||||
const target = args._[0]
|
||||
const formats = args.formats || args.f
|
||||
const buildAllMatching = args.all || args.a
|
||||
;(async () => {
|
||||
if (!target) {
|
||||
await buildAll(targets)
|
||||
checkAllSizes(targets)
|
||||
} else {
|
||||
await buildAll(fuzzyMatchTarget(target))
|
||||
checkAllSizes(fuzzyMatchTarget(target))
|
||||
await buildAll(fuzzyMatchTarget(target, buildAllMatching))
|
||||
checkAllSizes(fuzzyMatchTarget(target, buildAllMatching))
|
||||
}
|
||||
})()
|
||||
|
||||
|
||||
@@ -11,11 +11,14 @@ const targets = (exports.targets = fs.readdirSync('packages').filter(f => {
|
||||
return true
|
||||
}))
|
||||
|
||||
exports.fuzzyMatchTarget = partialTarget => {
|
||||
exports.fuzzyMatchTarget = (partialTarget, includeAllMatching) => {
|
||||
const matched = []
|
||||
for (const target of targets) {
|
||||
if (target.match(partialTarget)) {
|
||||
matched.push(target)
|
||||
if (!includeAllMatching) {
|
||||
return matched
|
||||
}
|
||||
}
|
||||
}
|
||||
if (matched.length) {
|
||||
|
||||
Reference in New Issue
Block a user