-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
915e58d
commit b627ea2
Showing
1 changed file
with
52 additions
and
13 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 |
---|---|---|
@@ -1,27 +1,66 @@ | ||
# Folder structure | ||
# kaboom-template | ||
|
||
- `src` - source code for your kaboom project | ||
- `www` - distribution folder, contains your index.html, built js bundle and static assets | ||
<kbd>kaboom-template</kbd> is a template for making [Kaboom](https://kaboomjs.com/) games. | ||
|
||
Demo: | ||
|
||
## Development | ||
- [remarkablegames](https://remarkablegames.org/kaboom-template) | ||
|
||
```sh | ||
$ npm run dev | ||
``` | ||
Stack: | ||
|
||
- [Kaboom](https://kaboomjs.com/) | ||
- [Vite](https://vitejs.dev/) | ||
- [GitHub Pages](https://pages.github.com/) | ||
|
||
will start a dev server at http://localhost:8000 | ||
## Prerequisites | ||
|
||
## Distribution | ||
- [nvm](https://github.com/nvm-sh/nvm#readme) | ||
|
||
## Install | ||
|
||
Clone the repository: | ||
|
||
```sh | ||
$ npm run build | ||
git clone https://github.com/remarkablegames/kaboom-template.git | ||
cd kaboom-template | ||
``` | ||
|
||
will build your js files into `www/main.js` | ||
Install the dependencies: | ||
|
||
```sh | ||
$ npm run bundle | ||
npm install | ||
``` | ||
|
||
will build your game and package into a .zip file, you can upload to your server or itch.io / newground etc. | ||
## 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) |