Added dist folder to repo.

Build now puts dev files in `build` folder instead, which is excluded from npm.
This commit is contained in:
Richard Davey 2018-02-13 03:42:57 +00:00
parent 49a23f7b6b
commit 1484d8251b
6 changed files with 9 additions and 6 deletions

3
.gitignore vendored
View file

@ -11,6 +11,5 @@ node_modules/
# Build # Build
/npm-debug.log /npm-debug.log
build/
out/ out/
v3/src/checksum.js
src/checksum.js

View file

@ -1,2 +1,2 @@
**/.* **/.*
wip/ build/

View file

@ -1,8 +1,8 @@
let fs = require('fs-extra'); let fs = require('fs-extra');
let sloc = require('node-sloc'); let sloc = require('node-sloc');
let source = './dist/phaser.js'; let source = './build/phaser.js';
let sourceMap = './dist/phaser.js.map'; let sourceMap = './build/phaser.js.map';
let dest = '../phaser3-examples/public/build/dev.js'; let dest = '../phaser3-examples/public/build/dev.js';
let destMap = '../phaser3-examples/public/build/phaser.js.map'; let destMap = '../phaser3-examples/public/build/phaser.js.map';

View file

@ -34,6 +34,7 @@
"web audio" "web audio"
], ],
"devDependencies": { "devDependencies": {
"clean-webpack-plugin": "^0.1.18",
"eslint": "^4.13.1", "eslint": "^4.13.1",
"fs-extra": "^5.0.0", "fs-extra": "^5.0.0",
"node-sloc": "^0.1.10", "node-sloc": "^0.1.10",

View file

@ -12,7 +12,7 @@ module.exports = {
}, },
output: { output: {
path: `${__dirname}/dist/`, path: `${__dirname}/build/`,
filename: '[name].js', filename: '[name].js',
library: 'Phaser', library: 'Phaser',
libraryTarget: 'umd', libraryTarget: 'umd',

View file

@ -2,6 +2,7 @@
const webpack = require('webpack'); const webpack = require('webpack');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = { module.exports = {
@ -38,6 +39,8 @@ module.exports = {
'WEBGL_RENDERER': JSON.stringify(true) 'WEBGL_RENDERER': JSON.stringify(true)
}), }),
new CleanWebpackPlugin(['dist']),
new UglifyJSPlugin({ new UglifyJSPlugin({
include: /\.min\.js$/, include: /\.min\.js$/,
parallel: true, parallel: true,