Merge branch 'master' into npm-script-and-doc
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
# phaser3-project-template
|
# Phaser 3 Webpack Project Template
|
||||||
|
|
||||||
A Phaser 3 Project Template
|
A Phaser 3 Project Template
|
||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
We need [Node.js](https://nodejs.org) to install and run scripts.
|
We need [Node.js](https://nodejs.org) to install and run scripts.
|
||||||
|
|
||||||
|
|
||||||
## Install and run
|
## Install and run
|
||||||
|
|
||||||
Run next commands in your terminal:
|
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 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. |
|
| `npm start` | Launch browser to show the examples. <br> Press `Ctrl + c` to kill **http-server** process. |
|
||||||
|
=======
|
||||||
|
|||||||
+7
-4
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "phaser3-project-template",
|
"name": "phaser3-project-template",
|
||||||
"version": "1.0.0",
|
"version": "1.0.8",
|
||||||
"description": "A Phaser 3 Project Template",
|
"description": "A Phaser 3 Project Template",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -19,8 +19,11 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/photonstorm/phaser3-project-template#readme",
|
"homepage": "https://github.com/photonstorm/phaser3-project-template#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"live-server": "^1.2.0",
|
"webpack-dev-server": "^2.11.0",
|
||||||
"phaser": "^3.0.0-beta.1",
|
"webpack": "^3.4.1",
|
||||||
"webpack": "^3.4.1"
|
"raw-loader": "^0.5.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"phaser": "^3.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,10 +9,24 @@ module.exports = {
|
|||||||
|
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, 'build'),
|
path: path.resolve(__dirname, 'build'),
|
||||||
|
publicPath: '/build/',
|
||||||
filename: 'project.bundle.js'
|
filename: 'project.bundle.js'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: [ /\.vert$/, /\.frag$/ ],
|
||||||
|
use: 'raw-loader'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'CANVAS_RENDERER': JSON.stringify(true),
|
||||||
|
'WEBGL_RENDERER': JSON.stringify(true)
|
||||||
|
})
|
||||||
]
|
]
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user