Skip to content

Commit 3f8923d

Browse files
authored
Merge pull request #60 from zapp-brannigan-dota/patch-branch
Add luaLibDir compiler option and in operator, fix template strings
2 parents 114dfd8 + 6b7451d commit 3f8923d

File tree

7 files changed

+548
-121
lines changed

7 files changed

+548
-121
lines changed

README.md

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,49 @@ More detailed documentation and info on writing declarations can be found [on th
1414

1515
**Compile Files**
1616

17-
`tstl path/to-my-file.ts path/to-my-other-file.ts`
17+
`tstl path/to/file.ts path/to/other-file.ts`
1818

1919
**Compile Projects**
2020

21-
`tstl -p path/to-my/tsconfig.json`
21+
`tstl -p path/to/tsconfig.json`
2222

2323
**Options**
2424
```
25-
Syntax: tstl [options] [files...]
25+
tstl [options] [files...]
2626
27-
In addtion to the options listed below you can also pass options for the
28-
typescript compiler (For a list of options use tsc -h). NOTE: The tsc options
29-
might have no effect.
27+
In addition to the options listed below you can also pass options for the
28+
typescript compiler (For a list of options use tsc -h).
29+
30+
NOTES:
31+
- The tsc options might have no effect.
32+
- Options in tsconfig.json are prioritized.
3033
3134
Options:
32-
--version Show version number
33-
--luaTarget, -l Specify Lua target version: 'JIT' (Default), '5.1', '5.2',
34-
'5.3'
35-
--project, -p Compile the project given the path to its configuration file,
36-
or to a folder with a 'tsconfig.json'
37-
--help Show this message
35+
--help Show help [boolean]
36+
--version Show version number [boolean]
37+
--lt, --luaTarget Specify Lua target version.
38+
[string] [choices: "JIT", "5.1", "5.2", "5.3"] [default: "JIT"]
39+
--lld, --luaLibDir Specify typescript_lualib.lua location relative to outDir.
40+
[string] [default: "./"]
41+
--ah, --addHeader Specify if a header will be added to compiled files.
42+
[boolean] [default: true]
43+
44+
Examples:
45+
tstl path/to/file.ts [...] Compile files
46+
tstl -p path/to/tsconfig.json Compile project
47+
```
48+
49+
**Example tsconfig.json**
50+
```
51+
{
52+
"compilerOptions": {
53+
"noImplicitAny" : true,
54+
"noImplicitThis" : true,
55+
"alwaysStrict" : true,
56+
"strictNullChecks": true,
57+
"luaTarget": "JIT"
58+
}
59+
}
3860
```
3961

4062
## Sublime Text integration

appveyor.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Test against the latest version of this Node.js version
2+
environment:
3+
nodejs_version: "8"
4+
5+
# Cache dependencies
6+
cache:
7+
- node_modules
8+
9+
# Install scripts. (runs after repo cloning)
10+
install:
11+
# Get the latest stable version of Node.js or io.js
12+
- ps: Install-Product node $env:nodejs_version
13+
# install modules
14+
- npm install
15+
16+
# Post-install test scripts.
17+
test_script:
18+
# Output useful info for debugging.
19+
- node --version
20+
- npm --version
21+
# run tests
22+
- npm run build
23+
- npm test
24+
25+
# Don't actually build.
26+
build: off

0 commit comments

Comments
 (0)