ismism/ismism.ts/cli/bundle.ts

8 lines
256 B
TypeScript
Raw Normal View History

2023-03-20 10:22:25 +08:00
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)
}))