-
Notifications
You must be signed in to change notification settings - Fork 0
/
_build_npm.ts
44 lines (40 loc) · 1.05 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
// 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/random-colors",
version: Deno.args[0],
description: "Random colors are tools for generating attractive color, " +
"similar colors, color palettes or any random colors.",
author: "mineejo",
license: "MIT",
homepage: "https://github.com/chalkpot/random_colors#readme",
repository: {
type: "git",
url: "git+https://github.com/chalkpot/random_colors.git",
},
bugs: {
url: "https://github.com/chalkpot/random_colors/issues",
},
keywords: [
"chalkpot",
"random",
"colors",
"color",
"similar",
"palette",
],
},
postBuild() {
Deno.copyFileSync("LICENSE", `${outDir}/LICENSE`);
Deno.copyFileSync("README.md", `${outDir}/README.md`);
},
});