Skip to content

Commit 95b9360

Browse files
committed
Now can install and use local installations of dependencies such as typescript and tslint.
1 parent 877c866 commit 95b9360

File tree

5 files changed

+360
-8
lines changed

5 files changed

+360
-8
lines changed

starter_kits/TypeScript/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Setup
2-
You should have typescript installed before developing. You can do this globally with `npm install -g tslint typescript`
3-
Run `npm install` to get the typescript definitions for node.
2+
Run `npm install` to locally install the required dependencies before developing.
43

54
# Development
65
The `run_game` scripts will run `tslint` and `tsc` to proof and compile the typescript sources before running the bot.

starter_kits/TypeScript/package-lock.json

Lines changed: 338 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "halite3-bot",
3+
"version": "0.0.1",
4+
"description": "Halite III Bot",
5+
"main": "./out/MyBot.js",
6+
"dependencies": {},
7+
"devDependencies": {
8+
"@types/node": "^10.12.10",
9+
"tslint": "^5.11.0",
10+
"typescript": "^3.1.6"
11+
},
12+
"scripts": {
13+
"tsc": "node ./node_modules/typescript/bin/tsc",
14+
"tslint": "node ./node_modules/tslint/bin/tslint --project ."
15+
},
16+
"author": "",
17+
"license": "",
18+
"private": true
19+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
tslint --project . && tsc && halite.exe --replay-directory replays/ -vvv --width 32 --height 32 "node .\out\MyBot.js" "node .\out\MyBot.js"
1+
npm run tslint && npm run tsc && halite.exe --replay-directory replays/ -vvv --width 32 --height 32 "node .\out\MyBot.js" "node .\out\MyBot.js"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22

3-
tslint --project . && tsc && ./halite --replay-directory replays/ -vvv --width 32 --height 32 "node MyBot.js" "node MyBot.js"
3+
npm run tslint && npm run tsc && ./halite --replay-directory replays/ -vvv --width 32 --height 32 "node MyBot.js" "node MyBot.js"

0 commit comments

Comments
 (0)