diff --git a/docs/documentation/building-from-source/v8.md b/docs/documentation/building-from-source/v8.md index f1f65f2..6104978 100644 --- a/docs/documentation/building-from-source/v8.md +++ b/docs/documentation/building-from-source/v8.md @@ -172,5 +172,5 @@ The currently used version of `v8` is `12.4.254.21`. > **NOTE:** Since the prebuilt `v8` library is built with the `windows-latest` github runner which uses VS2022, encountering `Unresolved external symbol` errors during linkage with `v8_monolith.lib` or `libucrt.lib` may be addressed by updating to the latest version of the `MSVC v143` toolchain, `Windows Universal CRT SDK` and `Visual Studio 2022` itself. See [GodotJS-Dependencies README](https://github.com/ialex32x/GodotJS-Dependencies) for the version of MSVC C++ Compiler used in different prebuilt library packages. -A prebuilt version of `Godot Editor` can be downloaded from [GodotJS-Build](https://github.com/ialex32x/GodotJS-Build/releases). +A prebuilt version of `Godot Editor` can be downloaded from [GodotJS-Build](https://github.com/godotjs/GodotJS/releases). **Because the GodotJS-Build workflow is currently run manually, it may not be built from the latest commit of `GodotJS`.** \ No newline at end of file diff --git a/docs/documentation/getting-started.md b/docs/documentation/getting-started.md index e9b69cd..331847d 100644 --- a/docs/documentation/getting-started.md +++ b/docs/documentation/getting-started.md @@ -1,12 +1,21 @@ -1. [Download the editor](https://github.com/ialex32x/GodotJS-Build/releases) and start the application -2. Rename the downloaded file to `godot` and [add Godot to your path](https://docs.godotengine.org/en/stable/tutorials/editor/command_line_tutorial.html#path) -3. Open a terminal -4. Test if you can use Godot via terminal and run: +1. [Download the `editor`](https://github.com/godotjs/GodotJS/releases) based on your OS and select an JS engine (we recommend `v8` for a start) and unzip it +2. Rename the downloaded file based on your OS: + - Linux: `godot.linuxbsd.editor.x86_64` ➡️ `godot` + - MacOS: no rename required + - Windows: `godot.windows.editor.x86_64.exe` ➡️ `godot.exe` +3. [Add Godot to your PATH](https://docs.godotengine.org/en/stable/tutorials/editor/command_line_tutorial.html#path) + - Linux: `/usr/local/bin` + - MacOS: `echo ~/your-path/Godot.app/Contents/MacOS|sudo tee /etc/paths.d/godot;bash -l;echo $PATH` + - Windows: `setx /M path "%path%;C:\your-path\windows-editor-v8"` +4. Open a terminal +5. Test if you can use Godot via terminal and run: ```shell godot --version ``` +> **Note:** The `Godot.app` isn't signed for MacOS you need to [allow to open it](https://support.apple.com/en-us/102445#:~:text=If%20you%20want%20to%20open%20an%20app%20that%20hasn%E2%80%99t%20been%20notarized%20or%20is%20from%20an%20unidentified%20developer). + ## Create a new project ### Automatically with [godot-ts](https://github.com/godotjs/godot-ts) @@ -41,7 +50,7 @@ To create new scripts, press select GodotJSScript as language: ![Select Language](images/tsproj_select_godotjs.png) -Use the ``Node: Node.Ts`` template: +Use the `Node: Node.Ts` template: ![Create a Script](images/tsproj_create_script.png) diff --git a/docs/documentation/godot-js-scripts/npm-dependencies.md b/docs/documentation/godot-js-scripts/npm-dependencies.md index 2cab846..cc0d98e 100644 --- a/docs/documentation/godot-js-scripts/npm-dependencies.md +++ b/docs/documentation/godot-js-scripts/npm-dependencies.md @@ -6,6 +6,25 @@ Currently, `GodotJS` doesn't provide sufficient support for using code from npm - How the typescript/javascript project is packaged (archive into a single script file or not) - Javascript modular standard variants may be involved -If a npm package just works, there is no guarantee that it does also work after packaging, `GodotJS` tries to export all dependant javascript sources into the targeting package. +## Workaround as bundle -> **NOTE:** See [read_xlsx.ts](https://github.com/ialex32x/GodotJSExample/blob/main/tests/read_xlsx.ts) about using a npm package. +Try to bundle npm dependencies to an own file to avoid potential conflicts. + +If you use [godot-ts](https://github.com/godotjs/godot-ts) you can create a `*.bundle.ts` file like this: + +```ts npm.bundle.ts +export { default as dayjs } from "dayjs"; +``` + +```ts example.ts +import { Label, Node } from "godot"; +import { dayjs } from "./npm.bundle"; + +export default class Example extends Node { + _ready(): void { + const label: Label = this.get_node("Label") as Label; + + label.text = dayjs().toString(); + } +} +``` diff --git a/docs/index.md b/docs/index.md index aa7e795..1556b29 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,7 +6,8 @@ hide: # **GodotJS** -**_-- JavaScript and TypeScript language binding for Godot game engine --_** +**_-- TypeScript/JavaScript Support for Godot 4.x by leveraging the high-performance capabilities of V8 to bring the delightful development experience of TypeScript into Godot. +--_** Supports JavaScript engines: @@ -39,11 +40,9 @@ No installation or setup necessary. The binaries for download are the complete, usable Godot editor and engine with JavaScript/TypeScript language support. -> **NOTE:** The GodotJS-Build workflow is currently run manually, it may not be built from the latest version of GodotJS. - ### Binary downloads -Download the binaries from the [GodotJS-Build](https://github.com/ialex32x/GodotJS-Build/releases). +Download the binaries from the [Releases](https://github.com/godotjs/GodotJS/releases). ### Choose your engine