Merge branch 'master' into npm-script-and-doc

This commit is contained in:
Richard Davey
2018-03-07 11:21:46 +00:00
committed by GitHub
3 changed files with 24 additions and 6 deletions
+3 -2
View File
@@ -1,11 +1,11 @@
# phaser3-project-template
# Phaser 3 Webpack Project Template
A Phaser 3 Project Template
### Requirements
We need [Node.js](https://nodejs.org) to install and run scripts.
## Install and run
Run next commands in your terminal:
@@ -14,3 +14,4 @@ Run next commands in your terminal:
|---------|-------------|
| `npm install` | Install dependencies and launch browser with examples.|
| `npm start` | Launch browser to show the examples. <br> Press `Ctrl + c` to kill **http-server** process. |
=======
+7 -4
View File
@@ -1,6 +1,6 @@
{
"name": "phaser3-project-template",
"version": "1.0.0",
"version": "1.0.8",
"description": "A Phaser 3 Project Template",
"main": "src/index.js",
"scripts": {
@@ -19,8 +19,11 @@
},
"homepage": "https://github.com/photonstorm/phaser3-project-template#readme",
"devDependencies": {
"live-server": "^1.2.0",
"phaser": "^3.0.0-beta.1",
"webpack": "^3.4.1"
"webpack-dev-server": "^2.11.0",
"webpack": "^3.4.1",
"raw-loader": "^0.5.1"
},
"dependencies": {
"phaser": "^3.2.0"
}
}
+14
View File
@@ -9,10 +9,24 @@ module.exports = {
output: {
path: path.resolve(__dirname, 'build'),
publicPath: '/build/',
filename: 'project.bundle.js'
},
module: {
rules: [
{
test: [ /\.vert$/, /\.frag$/ ],
use: 'raw-loader'
}
]
},
plugins: [
new webpack.DefinePlugin({
'CANVAS_RENDERER': JSON.stringify(true),
'WEBGL_RENDERER': JSON.stringify(true)
})
]
};