|
1 |
| -# Phaser 3 Webpack Project Template |
| 1 | +# Dino |
2 | 2 |
|
3 |
| -A Phaser 3 project template with ES6 support via [Babel 7](https://babeljs.io/) and [Webpack 4](https://webpack.js.org/) |
4 |
| -that includes hot-reloading for development and production-ready builds. |
| 3 | +A Chrome T-Rex Runner dino game (chrome://dino) clone built with [Phaser 3](https://phaser.io/) |
5 | 4 |
|
6 |
| -Loading images via JavaScript module `import` is also supported. |
| 5 | +## Demo |
7 | 6 |
|
8 |
| -## Requirements |
| 7 | +Play [online](https://dino.autapomorph.now.sh) |
9 | 8 |
|
10 |
| -[Node.js](https://nodejs.org) is required to install dependencies and run scripts via `npm`. |
| 9 | +## Running Locally |
11 | 10 |
|
12 |
| -## Available Commands |
| 11 | +### How to run? |
13 | 12 |
|
14 |
| -| Command | Description | |
15 |
| -|---------|-------------| |
16 |
| -| `npm install` | Install project dependencies | |
17 |
| -| `npm start` | Build project and open web server running project | |
18 |
| -| `npm run build` | Builds code bundle with production settings (minification, uglification, etc..) | |
| 13 | +- `npm i` |
| 14 | +- `npm start` |
19 | 15 |
|
20 |
| -## Writing Code |
| 16 | +### How to build? |
21 | 17 |
|
22 |
| -After cloning the repo, run `npm install` from your project directory. Then, you can start the local development |
23 |
| -server by running `npm start`. |
| 18 | +- `npm run build` |
| 19 | +- `npx serve dist` |
24 | 20 |
|
| 21 | +## Features |
25 | 22 |
|
26 |
| -After starting the development server with `npm start`, you can edit any files in the `src` folder |
27 |
| -and webpack will automatically recompile and reload your server (available at `http://localhost:8080` |
28 |
| -by default). |
| 23 | +- [PWA](https://developers.google.com/web/progressive-web-apps) |
| 24 | +- Responsive |
| 25 | +- Portrait and landscape modes |
| 26 | +- Touch support |
29 | 27 |
|
30 |
| -## Customizing Template |
| 28 | +## Also |
31 | 29 |
|
32 |
| -### Babel |
33 |
| -You can write modern ES6+ JavaScript and Babel will transpile it to a version of JavaScript that you |
34 |
| -want your project to support. The targeted browsers are set in the `.babelrc` file and the default currently |
35 |
| -targets all browsers with total usage over "0.25%" but excludes IE11 and Opera Mini. |
36 |
| - |
37 |
| - ``` |
38 |
| - "browsers": [ |
39 |
| - ">0.25%", |
40 |
| - "not ie 11", |
41 |
| - "not op_mini all" |
42 |
| - ] |
43 |
| - ``` |
44 |
| - |
45 |
| -### Webpack |
46 |
| -If you want to customize your build, such as adding a new webpack loader or plugin (i.e. for loading CSS or fonts), you can |
47 |
| -modify the `webpack/base.js` file for cross-project changes, or you can modify and/or create |
48 |
| -new configuration files and target them in specific npm tasks inside of `package.json'. |
49 |
| - |
50 |
| -## Deploying Code |
51 |
| -After you run the `npm run build` command, your code will be built into a single bundle located at |
52 |
| -`dist/bundle.min.js` along with any other assets you project depended. |
53 |
| - |
54 |
| -If you put the contents of the `dist` folder in a publicly-accessible location (say something like `http://mycoolserver.com`), |
55 |
| -you should be able to open `http://mycoolserver.com/index.html` and play your game. |
| 30 | +See Chromium [source](https://cs.chromium.org/chromium/src/components/neterror/resources/offline.js) |
0 commit comments