-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts.ts
44 lines (40 loc) · 1.17 KB
/
scripts.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
import type { ScriptsConfiguration } from "https://arweave.net/c_Zr-jv4RfZ1ERXdE3PMCT7GjMSGXAT1wKnhPbC4Cmg/mod.ts";
import eggJson from "./egg.json" assert { type: "json" };
const srcDir = "src";
const version = eggJson.version;
const install = [`deno install -Af --unstable https://x.nest.land/[email protected]/eggs.ts`];
const test = `deno test ${srcDir}`;
const testDenoExample = `deno test ./examples/deno`;
const testNpm = `npm --prefix npm test`;
const lint = `deno lint ${srcDir}`;
const fmt = `deno fmt ${srcDir}`;
const releaseNest = `eggs publish`;
const releaseNestPatch = `eggs publish --release-type patch`;
const buildNpm = `deno run -A ./build_npm.ts ${version}`;
const publishNpm = `cd ./npm && npm publish`;
const check = {
cmd: {
pll: [test, [fmt, lint], [buildNpm, testNpm]],
},
gitHook: "pre-commit",
};
export default <ScriptsConfiguration>{
scripts: {
install,
test,
testNpm,
testDenoExample,
testWatch: {
cmd: test,
watch: true,
},
lint,
fmt,
check,
buildNpm,
publishNpm,
releaseNpm: [check, buildNpm, testNpm, publishNpm],
releaseNestPatch: [releaseNestPatch],
releaseNest: [releaseNest],
},
};