Merge pull request #100 from BytewaveMLP/init-sprites-build

Attempt to fix build, part 3
This commit is contained in:
Eliot Partridge
2019-09-09 13:20:26 -05:00
committed by GitHub
3 changed files with 20 additions and 7 deletions
+7 -2
View File
@@ -196,11 +196,16 @@ node -e "console.log(require('crypto').randomBytes(64).toString('base64'))"
### Your first build
pixel.horse has modified the Pony Town archive such that compiled game assets are no longer included. To compile the game assets for the first time, you can either use a development build with the `--sprites` flag (see [Running in development](#running-in-development)), or use the following commands to build and start a production instance with compiled sprites:
pixel.horse has modified the Pony Town archive such that compiled game assets are no longer included. To compile the game assets for the first time, you must use the following command, which will generate the necessary spritesheets and corresponding data.
```bash
gulp sprites
```
If you would like to run a full production build after building spritesheets, you can use:
```bash
npm run build-sprites
npm start
```
### Production environment
+12 -4
View File
@@ -321,11 +321,18 @@ const setProd = cb => {
cb();
};
const empty = cb => cb();
const tsTools = npmScript('ts-tools');
const spritesTask = argv.sprites ? gulp.series(tsTools, sprites) : empty;
const warnAboutTscBeingDumb = cb => {
console.log("You're probably about to see some warnings from tsc about not being able to find certain files.");
console.log("Don't worry about these. It's a known issue regarding circular build dependencies. The build should continue despite these errors.");
cb();
};
const build = gulp.series(clean, setProd, spritesTask, common, ts, webpackProd, sw, size);
const empty = cb => cb();
const tsTools = gulp.series(warnAboutTscBeingDumb, npmScript('ts-tools'));
const spritesTask = argv.sprites ? sprites : empty;
const buildSprites = gulp.series(tsTools, sprites);
const build = gulp.series(clean, setProd, common, ts, webpackProd, sw, size);
const admin = gulp.series(clearnAdmin, setProd, sassAdmin, ts, webpackAdmin);
const dev = gulp.series(clean, spritesTask, common, gulp.parallel(serverDev, watch, watchTools));
@@ -334,6 +341,7 @@ module.exports = {
admin,
build,
dev,
sprites: buildSprites,
default: dev,
test: watchTests,
};
+1 -1
View File
@@ -27,7 +27,7 @@
"webpack-verbose": "npm run webpack-prod -- --verbose",
"wds": "webpack-dev-server --config webpack.dev.js --progress --color --debug --port 8091",
"build": "gulp build",
"build-sprites": "npm run build -- --sprites",
"build-sprites": "gulp sprites && npm run build",
"build-beta": "npm run build -- --beta --tools",
"build-fast": "npm run build -- --parallel",
"build-maps": "npm run build -- --maps",