mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 13:55:04 +02:00
Attempt to fix build, part 3
This commit is contained in:
@@ -196,11 +196,16 @@ node -e "console.log(require('crypto').randomBytes(64).toString('base64'))"
|
|||||||
|
|
||||||
### Your first build
|
### 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
|
```bash
|
||||||
npm run build-sprites
|
npm run build-sprites
|
||||||
npm start
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Production environment
|
### Production environment
|
||||||
|
|||||||
+12
-4
@@ -321,11 +321,18 @@ const setProd = cb => {
|
|||||||
cb();
|
cb();
|
||||||
};
|
};
|
||||||
|
|
||||||
const empty = cb => cb();
|
const warnAboutTscBeingDumb = cb => {
|
||||||
const tsTools = npmScript('ts-tools');
|
console.log("You're probably about to see some warnings from tsc about not being bale to find certain files.");
|
||||||
const spritesTask = argv.sprites ? gulp.series(tsTools, sprites) : empty;
|
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 admin = gulp.series(clearnAdmin, setProd, sassAdmin, ts, webpackAdmin);
|
||||||
const dev = gulp.series(clean, spritesTask, common, gulp.parallel(serverDev, watch, watchTools));
|
const dev = gulp.series(clean, spritesTask, common, gulp.parallel(serverDev, watch, watchTools));
|
||||||
|
|
||||||
@@ -334,6 +341,7 @@ module.exports = {
|
|||||||
admin,
|
admin,
|
||||||
build,
|
build,
|
||||||
dev,
|
dev,
|
||||||
|
sprites: buildSprites,
|
||||||
default: dev,
|
default: dev,
|
||||||
test: watchTests,
|
test: watchTests,
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@
|
|||||||
"webpack-verbose": "npm run webpack-prod -- --verbose",
|
"webpack-verbose": "npm run webpack-prod -- --verbose",
|
||||||
"wds": "webpack-dev-server --config webpack.dev.js --progress --color --debug --port 8091",
|
"wds": "webpack-dev-server --config webpack.dev.js --progress --color --debug --port 8091",
|
||||||
"build": "gulp build",
|
"build": "gulp build",
|
||||||
"build-sprites": "npm run build -- --sprites",
|
"build-sprites": "gulp sprites && npm run build",
|
||||||
"build-beta": "npm run build -- --beta --tools",
|
"build-beta": "npm run build -- --beta --tools",
|
||||||
"build-fast": "npm run build -- --parallel",
|
"build-fast": "npm run build -- --parallel",
|
||||||
"build-maps": "npm run build -- --maps",
|
"build-maps": "npm run build -- --maps",
|
||||||
|
|||||||
Reference in New Issue
Block a user