Skip to content

Commit e716991

Browse files
committed
merge npm scripts into makefile
1 parent b7604e1 commit e716991

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
DENO ?= deno
22

33
train:
4-
@bin/tsnode src/net/train.js
4+
@bin/tsnode train.js
5+
6+
sim:
7+
@bin/tsnode sim.ts
8+
9+
setup:
10+
@cd src/net && npm rebuild @tensorflow/tfjs-node-gpu --build-from-source
11+
12+
test-model:
13+
@cd src/net && node check_model.js
514

615
dev:
716
@$(DENO) run --allow-read --allow-run bin/dev.js
@@ -11,4 +20,4 @@ build:
1120
@cp index.html public
1221

1322
play:
14-
@$(DENO) run -c tsconfig.json --unstable --no-check src/tty.ts
23+
@$(DENO) run -c tsconfig.json --unstable --no-check src/tty.ts

bin/tsnode

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,11 @@
99
# https://github.com/TypeStrong/ts-node/issues/935#issuecomment-582673034
1010
#
1111

12-
node --loader @k-foss/ts-esnode --experimental-specifier-resolution=node $@
12+
# node_modules are in net
13+
14+
(cd src/net &&
15+
exec node \
16+
--loader @k-foss/ts-esnode \
17+
--experimental-specifier-resolution=node \
18+
$@
19+
)

src/net/package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@
33
"version": "0.0.1",
44
"description": "A brain for snake using ML training regimes.",
55
"type": "module",
6-
"scripts": {
7-
"build:tfjs": "npm rebuild @tensorflow/tfjs-node-gpu --build-from-source",
8-
"sim": "./../../bin/tsnode sim.ts",
9-
"train": "./../../bin/tsnode train.js",
10-
"test-model": "node check_model.js"
11-
},
6+
"scripts": {},
127
"dependencies": {},
138
"devDependencies": {
149
"@k-foss/ts-esnode": "^1.7.0",

0 commit comments

Comments
 (0)