diff --git a/README.md b/README.md index 71cf890..7e6352d 100644 --- a/README.md +++ b/README.md @@ -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 +kaboom-template 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. \ No newline at end of file +## 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)