Skip to content

Commit c6724f0

Browse files
authored
fix(docs): formatting, typos, new global func described, project directory structure described (#33)
* fix: more consistent formatting * fix: add missing reference to fixed_update * fix: update mention of eslint file type and add mention of other configuration files * fix: capitalization
1 parent edc7743 commit c6724f0

File tree

7 files changed

+20
-13
lines changed

7 files changed

+20
-13
lines changed

config/jargon.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ tstl:
3434
name: TSTL
3535
long_name: TypeScriptToLua Transpiler
3636
description: An extension to the TypeScript compiler that transpiles TypeScript
37-
code to lua
37+
code to Lua
3838
wip:
3939
name: WIP
4040
long_name: Work In Progress

content/configuration/def-api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ title: "Defold API"
33
order: 3
44
---
55

6-
Getting accurate types for the Defold API is an important part of ts-defold. Here are some
6+
Getting accurate types for the Defold API is an important part of ***ts-defold***. Here are some
77
ways to get the definitions you need:
88

9-
:sparkles: The `types` library is built-in into all ts-defold templates, and is automatically
9+
:sparkles: The `types` library is built-in into all ***ts-defold*** templates, and is automatically
1010
published to keep up with the latest changes to Defold.
1111

1212
:star2: [TS-Defold Types II](https://github.com/thinknathan/ts-defold-types)
@@ -45,7 +45,7 @@ const result = (go.get_position() + vmath.vector3(1, 1, 1)) as vmath.vector3; //
4545

4646
Or you can use the
4747
[Operator Map Types](https://typescripttolua.github.io/docs/advanced/language-extensions#operator-map-types)
48-
provided by TSTL to enable full type checking.
48+
provided by _TSTL_ to enable full type checking.
4949

5050
:notes: [Utility Types](https://github.com/thinknathan/tsd-util-types/blob/main/types/vmath.d.ts)
5151
include all relevant vector math operations.

content/configuration/def-extensions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ a strictly typed language like TypeScript. Here's how we handle it:
1212
# Library
1313

1414
The [@ts-defold/library](https://github.com/ts-defold/library) contains user-submitted
15-
types for popular Defold extensions. The library is included in all ts-defold templates.
15+
types for popular Defold extensions. The library is included in all ***ts-defold*** templates.
1616
Install your preferred extensions in Defold, then type `npm run resolve` to fetch
1717
the matching types from the library.
1818

content/configuration/plugins.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ title: "Plugins"
33
order: 2
44
---
55

6-
[TypeScriptToLua](https://typescripttolua.github.io/docs/api/plugins) allows you to extend the transpilers behavior and ***ts-defold*** uses this _API_ to bring some quality of life and necessary features to using TypeScript with Defold.
6+
[TypeScriptToLua](https://typescripttolua.github.io/docs/api/plugins) allows you to extend the transpiler's behavior and ***ts-defold*** uses this _API_ to bring some quality of life and necessary features to using TypeScript with Defold.
77

88
## Export Globals
99

1010
The [tstl-export-to-global](https://github.com/thinknathan/tstl-export-to-global)
1111
plugin is used to allow the export function to emulate the expected behavior of
1212
"exports" in a Defold game script.
1313

14-
The `init`, `on_input`, `on_message`, `on_reload`, `update`, and `final` functions
15-
are executed on each game script by the Defold game engine. Each of those functions
16-
are expected to be defined in the file scope of the game script for the game engine
17-
to execute them.
14+
The `init`, `on_input`, `on_message`, `on_reload`, `update`, `fixed_update`, and
15+
`final` functions are executed on each game script by the Defold game engine.
16+
Each of those functions are expected to be defined in the file scope of the
17+
game script for the game engine to execute them.
1818

1919
To adhere to these requirements, the ***tstl-export-to-global*** plugin will hoist
2020
all exports to the global scope of the file.

content/gettingstarted/cli.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ npm init @ts-defold ./project-name
2222
***@ts-defold/create*** templates follow this common directory structure
2323

2424
```bash
25-
├─ .eslintrc # Eslint configured to handle the caveats of TSTL & ts-defold
25+
├─ .prettierrc.json # Configuration for prettier code formatting
26+
├─ eslint.config.mjs # Eslint configured to handle the caveats of TSTL & ts-defold
2627
├─ package.json # NPM package dependencies and metadata
2728
├─ tsconfig.json # TypeScript compiler configuration for TSTL & ts-defold
2829
2930
├─ .github/ # Github workflows and automation [optional]
3031
├─ .vscode/ # Settings, extensions, and tasks for Visual Studio Code
32+
├─ @types/ # Type definitions for your project and native extensions
3133
3234
├─ app/ # The Defold game project
3335
│ ├─ lualib_bundle.lua # TypeScript support library

content/gettingstarted/quickstart.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,15 @@ system and configuration.</Info>
4444
## Project Directory Structure
4545

4646
```bash
47-
├─ .eslintrc # Eslint configured to handle the caveats of TSTL & ts-defold
47+
├─ .prettierrc.json # Configuration for prettier code formatting
48+
├─ eslint.config.mjs # Eslint configured to handle the caveats of TSTL & ts-defold
4849
├─ package.json # NPM package dependencies and metadata
4950
├─ tsconfig.json # TypeScript compiler configuration for TSTL & ts-defold
5051
52+
├─ .github/ # Github workflows and automation [optional]
53+
├─ .vscode/ # Settings, extensions, and tasks for Visual Studio Code
54+
├─ @types/ # Type definitions for your project and native extensions
55+
5156
├─ app/ # The Defold game project
5257
│ ├─ lualib_bundle.lua # TypeScript support library
5358
│ ├─ modules/ # Transpiled shared lua modules

content/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ your [Defold](https://defold.com) game projects.
3636
## Why TypeScript? :sparkles:
3737

3838
Defold uses Lua for its game scripting language, and it is an excellent choice!
39-
The ts-defold team loves Lua, and has worked with Lua for years. So why TypeScript?
39+
The ***ts-defold*** team loves Lua, and has worked with Lua for years. So why TypeScript?
4040

4141
TypeScript brings compile-time type-checking, generics, cutting-edge IDE support,
4242
better code maintainability, a familiar syntax, and a lot of other cool features.

0 commit comments

Comments
 (0)