-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_build_npm.ts
60 lines (55 loc) · 1.27 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
60
// Copyright 2023 mineejo. All rights reserved. MIT license.
import { build, emptyDir } from "https://deno.land/x/dnt@0.38.1/mod.ts";
const outDir = "./.npm";
await emptyDir(outDir);
await build({
entryPoints: ["./mod.ts"],
outDir: outDir,
shims: {
deno: true,
},
test: true,
package: {
name: "@chalkpot/color_convert",
version: Deno.args[0],
description:
"Color convert is a set of conversion functions and automated conversions of color models and formats.",
author: "mineejo",
license: "MIT",
homepage: "https://github.com/chalkpot/color_convert#readme",
repository: {
type: "git",
url: "git+https://github.com/chalkpot/color_convert.git",
},
bugs: {
url: "https://github.com/chalkpot/color_convert/issues",
},
keywords: [
"chalkpot",
"color",
"convert",
"color-convert",
"ansi16",
"ansi256",
"cmy",
"cmyk",
"hex",
"hsb",
"hsl",
"hsv",
"lab",
"name",
"rgb",
"xyz",
],
},
postBuild() {
Deno.copyFileSync("LICENSE", `${outDir}/LICENSE`);
Deno.copyFileSync("README.md", `${outDir}/README.md`);
},
});
await Deno.writeTextFile(
`${outDir}/.npmignore`,
"/_generator\n",
{ append: true },
);