-
Notifications
You must be signed in to change notification settings - Fork 3
/
npm.ts
41 lines (38 loc) · 988 Bytes
/
npm.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { build, emptyDir } from "https://deno.land/x/[email protected]/mod.ts";
import { assert } from "./t/asserts.ts";
await emptyDir("./npm");
let version = Deno.env.get("NPM_VERSION");
assert(version, "NPM_VERSION is required to build npm package");
await build({
entryPoints: ["./mod.ts"],
outDir: "./npm",
shims: {
deno: false,
},
test: false,
typeCheck: false,
compilerOptions: {
target: "ES2020",
sourceMap: true,
},
package: {
// package.json properties
name: "@frontside/continuation",
version,
description: "Delimited continuations for JavaScript",
license: "MIT",
repository: {
author: "[email protected]",
type: "git",
url: "git+https://github.com/thefrontside/continuation.git",
},
bugs: {
url: "https://github.com/thefrontside/continuation/issues",
},
engines: {
node: ">= 14",
},
sideEffects: false,
},
});
await Deno.copyFile("README.md", "npm/README.md");