-
Notifications
You must be signed in to change notification settings - Fork 0
/
_build_npm.ts
42 lines (38 loc) · 976 Bytes
/
_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
// Copyright 2023 mineejo. All rights reserved. MIT license.
import { build, emptyDir } from "https://deno.land/x/[email protected]/mod.ts";
const outDir = "./.npm";
await emptyDir(outDir);
await build({
entryPoints: ["./mod.ts"],
outDir: outDir,
shims: {
deno: true,
},
test: true,
package: {
name: "@chalkpot/color",
version: Deno.args[0],
description:
"Color is a tool for creating RGB color by range and by HSL without leaving RGB space.",
author: "mineejo",
license: "MIT",
homepage: "https://github.com/chalkpot/color#readme",
repository: {
type: "git",
url: "git+https://github.com/chalkpot/color.git",
},
bugs: {
url: "https://github.com/chalkpot/color/issues",
},
keywords: [
"chalkpot",
"color",
"rgb",
"hsl",
],
},
postBuild() {
Deno.copyFileSync("LICENSE", `${outDir}/LICENSE`);
Deno.copyFileSync("README.md", `${outDir}/README.md`);
},
});