-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile.ts
43 lines (41 loc) · 1.2 KB
/
compile.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
// ex. scripts/build_npm.ts
import { build, emptyDir } from "https://deno.land/x/[email protected]/mod.ts";
import project from "./project.json" with { type: "json" };
await emptyDir("./npm");
await build({
entryPoints: [
"./mod.ts",
{
name: "./react",
path: "react.ts",
},
{
name: "./vue",
path: "vue.ts",
},
],
outDir: "./npm",
shims: {
// see JS docs for overview and more options
deno: true,
},
package: {
// package.json properties
name: "@theopensource-company/feature-flags",
version: project.version,
description: "Abstraction of logic to handle feature flags",
license: "Apache Licence 2.0",
repository: {
type: "git",
url: "git+https://github.com/theopensource-company/feature-flags",
},
bugs: {
url: "https://github.com/theopensource-company/feature-flags/issues",
},
},
postBuild() {
// steps to run after building and before running the tests
Deno.copyFileSync("LICENSE", "npm/LICENSE");
Deno.copyFileSync("README.md", "npm/README.md");
},
});