https://github.com/mattjennings/replay-starter-ts-jsx
A starter template for building a Replay game (TypeScript + JSX)
https://github.com/mattjennings/replay-starter-ts-jsx
Last synced: about 1 month ago
JSON representation
A starter template for building a Replay game (TypeScript + JSX)
- Host: GitHub
- URL: https://github.com/mattjennings/replay-starter-ts-jsx
- Owner: mattjennings
- Created: 2020-07-21T02:00:35.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-21T02:00:47.000Z (almost 5 years ago)
- Last Synced: 2025-04-08T19:31:47.107Z (2 months ago)
- Language: JavaScript
- Size: 29.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Replay Starter (TypeScript)
Welcome to your game!
## Structure
- `assets`: Assets like audio and images go here. Nested folders are not currently supported.
- `src`: Where your game code and tests go.
- `swift`: Code specific to deploying to iOS goes here, such as your Xcode project.
- `web`: Code specific to deploying to web goes here. You can edit the web load screen too.
- `.eslintignore` / `.eslintrc.js`: Configure your linting rules.
- `.gitignore`: List of files to ignore in git.
- `jest.config.js`: Config file for Jest tests.
- `package.json` / `package-lock.json`: Manage dependencies of your project.
- `tsconfig.json`: Config for TypeScript.## Setup
```bash
npm install
```## Development
```bash
npm start
```Runs your game locally in the browser using [webpack-dev-server](https://github.com/webpack/webpack-dev-server). Will auto-refresh on changes.
> Note: if you add or rename audio and image assets, you need to restart the dev server.
## Type check code
```bash
npm run types
```Checks your TypeScript types are correct.
## Lint files
```bash
npm run lint
```Lints your code using [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for formatting. Edit [.eslintrc.js](./.eslintrc.js) to change lint rules.
## Test
```bash
npm run test# or watch for file changes
npm run test:watch
```Runs tests using Jest. Will look out for files of name `*.test.ts` in a `__tests__` directory.
## Build for web
```bash
npm run build-web
```Creates an HTML, JS and assets bundle in `web/dist`. You can then deploy this somewhere to share with the world!
## Run on iOS
```bash
npm run build-swift
open swift/replay-starter-ts.xcodeproj/
# run in Xcode
```Assets like audio and images need to be dragged into your Xcode project.