-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Changes for JSR and version example program. * Revise Creating a Project. * Remove @latest specifier in deno.json. * Fix build.ts * Eliminate deps.ts * Update copyright year. * Update version.
- Loading branch information
Showing
34 changed files
with
387 additions
and
379 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
|
||
"editor.tabSize": 2, | ||
|
||
"[josn,ts]": { | ||
"[josn,typescript]": { | ||
"editor.defaultFormatter": "denoland.vscode-deno" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,12 @@ Currently working via [deno](https://deno.land/) on Windows, Linux, and mac OS u | |
|
||
## Non Goals | ||
|
||
- Creating a higher level API or Game Framework. This library's only purpose is to expose the SDL API to deno. | ||
- Creating a higher level API or Game Framework. This library's only purpose is to expose the SDL API to TypeScript. | ||
|
||
## Versioning | ||
|
||
This library's version number will match the SDL major and minor version against which it is currently tested. The patch | ||
number will be specifici to this library. I.E. | ||
|
||
## Getting Started | ||
|
||
|
@@ -58,19 +63,9 @@ brew install sdl2 sdl2_image sdl2_ttf | |
|
||
### Creating a Project | ||
|
||
To aid in creating a new project which uses `SDL_ts` there is an `init.ts` script to aid in getting your project set up: | ||
|
||
```bash | ||
deno run --allow-net --allow-read=/path/to/project --allow-write=/path/to/project --import-map https://deno.land/x/[email protected]/imports.deno.json https://deno.land/x/[email protected]/init.ts /path/to/project | ||
``` | ||
|
||
Replace `/path/to/project` with the desired project path. After that the new project can be started via a deno task: | ||
|
||
```bash | ||
deno task start | ||
``` | ||
|
||
You should be presented with a window titled "SDL_ts". | ||
Located in the directory [examples/getting-started](examples/getting-started/) are a minimal set of files needed to get | ||
a project up and running. Copy these files onto your computer and start the project with `deno task start`. You should | ||
see a window with `SDL_ts` as the title. | ||
|
||
### Loading only required functions | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"name": "@smack0007/sdl-ts", | ||
"version": "2.30.1", | ||
"exports": "./mod.ts", | ||
"compilerOptions": { | ||
"lib": ["deno.window", "deno.unstable"] | ||
}, | ||
|
@@ -14,7 +17,12 @@ | |
"exclude": ["no-inferrable-types"] | ||
} | ||
}, | ||
"importMap": "imports.json", | ||
"imports": { | ||
"SDL_ts": "./mod.ts", | ||
"@std/assert": "jsr:@std/[email protected]", | ||
"@std/colors": "jsr:@std/[email protected]/colors", | ||
"@std/path": "jsr:@std/[email protected]" | ||
}, | ||
"tasks": { | ||
"build": "cd ./scripts && deno run --allow-read --allow-run ./build.ts", | ||
"build:ci": "deno task build --ci", | ||
|
@@ -28,6 +36,7 @@ | |
"run:play-wav": "cd ./examples/play-wav && SDL_TS_ENV_DIR=$INIT_CWD deno run --unstable-ffi --allow-env --allow-ffi --allow-read=../.. $DENO_FLAGS ./main.ts", | ||
"run:renderer": "cd ./examples/renderer && SDL_TS_ENV_DIR=$INIT_CWD deno run --unstable-ffi --allow-env --allow-ffi --allow-read=../.. $DENO_FLAGS ./main.ts", | ||
"run:same-game": "cd ./examples/same-game && SDL_TS_ENV_DIR=$INIT_CWD deno run --unstable-ffi --allow-env --allow-ffi --allow-read=../.. $DENO_FLAGS ./main.ts", | ||
"run:version": "cd ./examples/version && SDL_TS_ENV_DIR=$INIT_CWD deno run --unstable-ffi --allow-env --allow-ffi --allow-read=../.. $DENO_FLAGS ./main.ts", | ||
"test": "deno test --unstable-ffi --allow-ffi" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"imports": { "@smack0007/sdl-ts": "jsr:@smack0007/sdl-ts" }, | ||
"tasks": { | ||
"start": "deno run --unstable-ffi --allow-env --allow-ffi --allow-read=. ./main.ts" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.