34 lines
834 B
TypeScript
34 lines
834 B
TypeScript
// ex. scripts/build_npm.ts
|
|
import { build, emptyDir } from "https://deno.land/x/dnt/mod.ts";
|
|
|
|
await emptyDir("./npm");
|
|
|
|
await build({
|
|
entryPoints: ["./mod.ts"],
|
|
packageManager: "yarn",
|
|
outDir: "./npm",
|
|
shims: {
|
|
// see JS docs for overview and more options
|
|
deno: true,
|
|
},
|
|
package: {
|
|
// package.json properties
|
|
name: "deno-srt-to-vtt",
|
|
version: Deno.args[0],
|
|
description:
|
|
"A deno library that converts SRT files to VTT equivalents so they can be broadcast on the Internet.",
|
|
license: "MIT",
|
|
repository: {
|
|
type: "git",
|
|
url: "https://git.froth.zone/sam/srt-to-vtt",
|
|
},
|
|
bugs: {
|
|
url: "https://git.froth.zone/sam/srt-to-vtt/issues",
|
|
},
|
|
},
|
|
});
|
|
|
|
// post build steps
|
|
Deno.copyFileSync("LICENSE", "npm/LICENSE");
|
|
Deno.copyFileSync("README.md", "npm/README.md");
|