[README]: Added sections Usage and Images

This commit is contained in:
corner 2020-04-21 11:24:24 +02:00
parent 8ebac5da24
commit 483582842a
1 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,8 @@
# asdf-browser-template
This is a template for creating games in the browser with the [asdf-games](https://gitea.arnweb.nl/arne/asdf-games) framework. It works with gulp (and plugins), browserify, tsify, babelify and eslint. These packages allow you to create browser games with asdf in typescript without having to worry about browser compatibility (babel).
This is a template for creating games in the browser with the [asdf-games](https://gitea.arnweb.nl/arne/asdf-games) framework. It works with gulp, browserify, tsify, babelify, eslint and more other plugins. These packages allow you to create browser games with asdf in typescript without having to worry about browser compatibility (babel) or refreshing your page (live-server & gulp).
## 🏗️ Installation
To get started, clone the repository and run npm:
```bash
@ -8,4 +10,12 @@ git clone https://gitea.arnweb.nl/corner/asdf-browser-template.git && cd asdf-br
npm i
```
## 💻 Usage
You are now ready to rock! Start coding some great games! If you want to transpile your project into valid JS and HTML run `npm run build`. This will create a output.js, output.min.js and an index.html. Open up the index.html in your browser, and there is your game, ready to be distributed.
If you want to get the best developer experience with hot reload, run `npm run watch`. This will launch a browser window with your game. If you change anything in your `src` folder, gulp will re-transpile the project and live-server will then reload the browser page.
## 🖼️ Images
If you want to make use of images in your project, create the folder `src/res`, and place your images in there. The `res` folder will also be transpiled (imagemin minifies the files) and the files are, then, placed in the `dist` folder. The pathnames will also stay the same.