-
Notifications
You must be signed in to change notification settings - Fork 1
/
_build_npm.ts
executable file
·59 lines (53 loc) · 1.3 KB
/
_build_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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-net --allow-env --allow-run
// Copyright 2018-2022 the oak authors. All rights reserved. MIT license.
/**
* This is the build script for building npm package.
*
* @module
*/
import { build, emptyDir } from "https://deno.land/x/[email protected]/mod.ts";
async function start() {
await emptyDir("./npm");
await build({
entryPoints: [
"./mod.ts",
{
kind: "bin",
name: "is-bun",
path: "./cli.ts",
},
],
outDir: "./npm",
shims: {},
test: false,
typeCheck: "both",
compilerOptions: {
importHelpers: false,
sourceMap: true,
target: "ES2021",
lib: ["esnext", "dom", "dom.iterable"],
},
package: {
name: "is-bun",
version: Deno.args[0],
description: "Return true if you are running in Bun.",
license: "MIT",
keywords: ["bun"],
engines: {
node: ">=8.0.0",
},
repository: {
type: "git",
url: "git+https://github.com/JLarky/is-bun.git",
},
bugs: {
url: "https://github.com/JLarky/is-bun/issues",
},
dependencies: {},
devDependencies: {},
},
});
await Deno.copyFile("LICENSE", "npm/LICENSE");
await Deno.copyFile("README.md", "npm/README.md");
}
start();