ismism/ismism.ts/cli/bundle.ts
2023-03-20 10:22:25 +08:00

8 lines
256 B
TypeScript

import { bundle } from "https://deno.land/x/emit@0.16.0/mod.ts"
await Promise.all(Deno.args.map(async p => {
const b = await bundle(`${p}.ts`)
const trg = b.code.replaceAll(/\/\/# sourceMappingURL=.*/g, "")
await Deno.writeTextFile(`${p}.js`, trg)
}))