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
TheBrokenRail 0e3b0cbc87
ScriptCraft/pipeline/head There was a failure building this commit Details
Use Composite Builds
2020-05-31 13:25:16 -04:00
..
src/main Use Composite Builds 2020-05-31 13:25:16 -04:00
.gitignore Use Self-Hosted Maven 2020-04-29 14:56:51 -04:00
README.md Allow Specifying Custom TypeScript Root 2020-05-29 17:19:14 -04:00
build.gradle.kts Use Composite Builds 2020-05-31 13:25:16 -04:00
gradle Use Composite Builds 2020-05-31 13:25:16 -04:00
gradle.properties Use Self-Hosted Maven 2020-04-29 14:56:51 -04:00
gradlew Use Composite Builds 2020-05-31 13:25:16 -04:00
settings.gradle.kts Use Composite Builds 2020-05-31 13:25:16 -04:00

README.md

TypeScript Example

This is an example of a Minecraft mod made in TypeScript using ScriptCraft.

Files

  • src/main/ts: Contains TypeScript Code
  • src/main/java: Contains Bootstrap Java Code

Notes

  • This will also work with JavaScript if you set compilerOptions.allowJs and optionally compilerOptions.checkJs in src/main/ts/tsconfig.json to true
  • NPM dependencies are not bundled
  • API JARs are not bundled

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.

File Structure

- API JAR Root
  - src/
    - Source Root
  - types/
    - File structure of node_modules/@types