1
1
# TypeScript Resource Boilerplate for MTASA
2
2
3
- Write and compile TypeScript code to Lua.
3
+ Write and compile TypeScript code to Lua.
4
4
5
- A documentation in your IDE. Types safety. Linting.
5
+ A documentation in your IDE. Types safety. Linting.
6
6
7
7
** Features**
8
8
9
- - 🔥 [ TypeScriptToLua] ( https://www.npmjs.com/package/typescript-to-lua )
10
- Provides compilation.
9
+ - 🔥 [ TypeScriptToLua] ( https://www.npmjs.com/package/typescript-to-lua )
10
+ Provides compilation.
11
11
12
- - 📓 [ MTASA Lua Types] ( https://www.npmjs.com/package/mtasa-lua-types )
13
- Provides types declarations and the documentation for MTASA Functions and classes.
12
+ - 📓 [ MTASA Lua Types] ( https://www.npmjs.com/package/mtasa-lua-types )
13
+ Provides types declarations and the documentation for MTASA Functions and classes.
14
14
15
- - ✅ [ MTASA Lua Utils] ( https://www.npmjs.com/package/mtasa-lua-utils )
16
- Provides code preparation and MTASA specific linting.
17
-
18
- - ✒️ [ Prettier] ( https://www.npmjs.com/package/prettier )
19
- Code formatter
20
-
21
- - ⌛ In the future: ** ESLint** for linting TypeScript Code
15
+ - ✅ [ MTASA Lua Utils] ( https://www.npmjs.com/package/mtasa-lua-utils )
16
+ Provides code preparation and MTASA specific linting.
17
+ - ✒️ [ Prettier] ( https://www.npmjs.com/package/prettier )
18
+ Code formatter
19
+ - ⌛ In the future: ** ESLint** for linting TypeScript Code
22
20
23
21
# Getting started
24
22
@@ -31,13 +29,13 @@ Installation for [Windows](https://nodejs.org/en/download/).
31
29
32
30
Installation for Linux:
33
31
34
- * Debian or Ubuntu *
32
+ _ Debian or Ubuntu _
35
33
36
34
``` shell
37
35
apt install nodejs
38
36
```
39
37
40
- * Arch or Manjaro *
38
+ _ Arch or Manjaro _
41
39
42
40
``` shell
43
41
pacman -S nodejs
@@ -55,7 +53,7 @@ npm version
55
53
56
54
## Download boilerplate
57
55
58
- The boilerplate should be downloaded into the
56
+ The boilerplate should be downloaded into the
59
57
[ resources folder] ( https://wiki.multitheftauto.com/wiki/Resources#:~:text=This%20is%20located ) .
60
58
61
59
You can use ` git ` :
@@ -85,7 +83,7 @@ Command:
85
83
npm run build
86
84
```
87
85
88
- Always running the command to build the resource is annoying.
86
+ Always running the command to build the resource is annoying.
89
87
Below there are possible solutions to simplify it.
90
88
91
89
# Code Editor Preparation
@@ -121,7 +119,7 @@ Configuration provided in [.vscode/settings.json](.vscode/settings.json) and wil
121
119
122
120
** NOTE** : In the current version configuration should have been loaded by default.
123
121
124
- In the top right corner press ` Edit Configurations ` .
122
+ In the top right corner press ` Edit Configurations ` .
125
123
Press ` Add New Configuration ` (Plus icon), select ` npm ` and select ** build** in ` Scripts ` field.
126
124
127
125
![ Configuration] ( https://i.imgur.com/79iD3fW.png )
@@ -134,10 +132,10 @@ Now you can press `Shift+F10` to compile your resource.
134
132
135
133
Compile can be executed after file saving.
136
134
137
- Open ` Settings ` -> ` Tools ` -> ` File watchers ` .
135
+ Open ` Settings ` -> ` Tools ` -> ` File watchers ` .
138
136
Add new file watcher for TypeScript files in project scope.
139
137
Put ** npm** into the ` Script ` field and ** run build** into the ` Srguments ` field.
140
138
141
139
![ File Watcher] ( https://i.imgur.com/NuLtNH3.png )
142
140
143
- Thus, saving after editing TypeScript files triggers compilation.
141
+ Thus, saving after editing TypeScript files triggers compilation.
0 commit comments