This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
ScriptCraft/examples/typescript/README.md

26 lines
840 B
Markdown
Raw Normal View History

2020-04-29 23:41:08 +00:00
# TypeScript Example
This is an example of a Minecraft mod made in TypeScript using ScriptCraft.
2020-05-25 21:21:56 +00:00
## Files
2020-04-29 23:41:08 +00:00
- ```src/main/ts```: Contains TypeScript Code
- ```src/main/java```: Contains Bootstrap Java Code
2020-05-25 21:21:56 +00:00
## Notes
2020-05-05 00:40:06 +00:00
- This will also work with JavaScript if you set ```compilerOptions.allowJs``` and optionally ```compilerOptions.checkJs``` in ```src/main/ts/tsconfig.json``` to ```true```
2020-05-24 18:09:25 +00:00
- NPM dependencies are not bundled
- API JARs are not bundled
2020-05-25 21:21:56 +00:00
## API JARs
An API JAR can be built with ```./gradlew apiJar```.
### ```typescript``` Gradle Configuration
The ```typescript``` gradle configuration will extract the specified API JAR into ```src/main/ts/build/dependencies```. It will not be bundled with the mod.
2020-05-25 21:21:56 +00:00
### File Structure
2020-05-24 19:09:14 +00:00
```
- API JAR Root
- src/
- Source Root
- types/
- File structure of node_modules/@types
2020-05-24 18:09:25 +00:00
```