https://github.com/remarkablegames/littlejs-template
🚋 LittleJS game template
https://github.com/remarkablegames/littlejs-template
engine game game-engine javascript littlejs template typescript web
Last synced: 3 months ago
JSON representation
🚋 LittleJS game template
- Host: GitHub
- URL: https://github.com/remarkablegames/littlejs-template
- Owner: remarkablegames
- License: mit
- Created: 2024-11-17T20:35:52.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2026-04-08T15:28:03.000Z (3 months ago)
- Last Synced: 2026-04-08T17:26:40.847Z (3 months ago)
- Topics: engine, game, game-engine, javascript, littlejs, template, typescript, web
- Language: TypeScript
- Homepage: http://remarkablegames.org/littlejs-template/
- Size: 821 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# LittleJS Template
[](https://github.com/remarkablegames/littlejs-template/releases)
[](https://github.com/remarkablegames/littlejs-template/actions/workflows/build.yml)
littlejs-template is a template for making [LittleJS](https://github.com/KilledByAPixel/LittleJS) games.
Play the game on:
- [remarkablegames](https://remarkablegames.org/littlejs-template/)
## Prerequisites
[nvm](https://github.com/nvm-sh/nvm#installing-and-updating):
```sh
brew install nvm
```
## Install
Clone the repository:
```sh
git clone https://github.com/remarkablegames/littlejs-template.git
cd littlejs-template
```
Install the dependencies:
```sh
npm install
```
Rename the project:
```sh
git grep -l littlejs-template | xargs sed -i '' -e 's/littlejs-template/my-game/g'
git grep -l 'LittleJS Template' | xargs sed -i '' -e 's/LittleJS Template/My Game/g'
```
Update the files:
- [ ] `README.md`
- [ ] `package.json`
- [ ] `index.html`
- [ ] `public/manifest.json`
- [ ] `src/index.ts`
Initialize a new repository:
```sh
rm -rf .git
git init
```
Make your first commit:
```sh
git add .
git commit -m 'feat: initialize project from littlejs-template'
```
> [!NOTE]
> Commit messages follow [Conventional Commits](https://conventionalcommits.org/), which helps with release.
Once you're ready, [push the local repository to GitHub](https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/) (or another remote repository):
```sh
git remote add origin
git push origin -u origin master
```
## Environment Variables
Set the environment variables:
```sh
less .env
```
Update the **Secrets** in the repository **Settings**.
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the game in the development mode.
Open [http://localhost:5173](http://localhost:5173) to view it in the browser.
The page will reload if you make edits.
You will also see any errors in the console.
### `npm run build`
Builds the game for production to the `dist` folder.
It correctly bundles in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your game is ready to be deployed!
### `npm run bundle`
Builds the game and packages it into a Zip file in the `dist` folder.
Your game can be uploaded to your server, [Itch.io](https://itch.io/), [Newgrounds](https://www.newgrounds.com/), etc.
## License
[MIT](LICENSE)