Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use
bundt
for building worktop packages (#152)
* chore(worktop): rename `src/router.ts` -> `src/index.ts` * chore(bin): use `tsm` for test TS transform * chore: use `bundt` for package builders * chore: add jsdoc for bin types * chore: use `build.mjs` instead * chore(bin): use `tsm` for build script
- Loading branch information
Showing
8 changed files
with
42 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { resolve } from 'path'; | ||
import * as bundt from 'bundt'; | ||
|
||
const root = resolve('packages'); | ||
const minify = !process.argv.includes('--dev'); | ||
|
||
let result: bundt.Output = {}; | ||
|
||
async function run(mod: string) { | ||
let dir = resolve(root, mod); | ||
let stats = await bundt.build(dir, { minify }); | ||
Object.assign(result, stats); | ||
} | ||
|
||
try { | ||
var timer = process.hrtime(); | ||
await Promise.all([ | ||
run('create-worktop'), | ||
run('worktop.build'), | ||
run('worktop'), | ||
]); | ||
timer = process.hrtime(timer); | ||
} catch (err) { | ||
let msg = (err as Error).stack || err; | ||
console.error(msg); | ||
process.exit(1); | ||
} | ||
|
||
console.log( | ||
await bundt.report(result, { | ||
cwd: root, | ||
gzip: true, | ||
delta: timer, | ||
}) | ||
); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters