Nuxt/scripts/build-all.ts

19 lines
430 B
TypeScript
Raw Normal View History

2021-04-04 14:22:40 +00:00
import { readdir } from 'fs/promises'
import { resolve } from 'upath'
import { build } from './build'
async function main () {
const pkgsDir = resolve(__dirname, '../packages')
const pkgs = await readdir(pkgsDir)
const stub = process.argv.includes('--stub')
for (const pkg of pkgs) {
const rootDir = resolve(pkgsDir, pkg)
process.chdir(rootDir)
await build(rootDir, stub)
}
}
main().catch(console.error)