-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.ts
46 lines (42 loc) · 1.1 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
45
46
import type { ScriptsConfiguration } from "https://arweave.net/c_Zr-jv4RfZ1ERXdE3PMCT7GjMSGXAT1wKnhPbC4Cmg/mod.ts";
const srcDir = "src";
const version = "0.0.1";
const install = [`deno install -Af --unstable https://x.nest.land/[email protected]/eggs.ts`];
const test = `deno test --allow-env=TMPDIR --allow-read --allow-write --allow-run --allow-net --unstable ${srcDir}`;
const lint = `deno lint ${srcDir}`;
const fmt = `deno fmt ${srcDir}`;
const buildNpm = {
cmd: {
pll: [
`deno run -A ./build_main.ts ${version}`,
`deno run -A ./build_jest-adapter.ts ${version}`
]
}
};
const testNpm = `npm --prefix nodejs-test test`;
const checkNpm = [buildNpm, testNpm];
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,
checkNpm,
testWatch: {
cmd: test,
watch: true,
},
lint,
fmt,
check,
buildNpm,
publishNpm,
releaseNpm: [check, buildNpm, testNpm, publishNpm],
},
};