1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Update electron, greenworks. Add task to add local config if not present

This commit is contained in:
Greg Considine 2021-03-01 08:35:54 -05:00
parent 42d9901614
commit dab41d19e7
5 changed files with 39 additions and 16 deletions

View File

@ -8,10 +8,10 @@
"version": "1.0.0",
"license": "MIT",
"devDependencies": {
"electron": "9.4.3"
"electron": "11.3.0"
},
"optionalDependencies": {
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts#af8d792fe1429af95d990bba4a68362c2aa907c9"
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts#abi-v85"
}
},
"node_modules/@electron/get": {
@ -242,9 +242,9 @@
"dev": true
},
"node_modules/electron": {
"version": "9.4.3",
"resolved": "https://registry.npmjs.org/electron/-/electron-9.4.3.tgz",
"integrity": "sha512-FQjVH0jdFj9EIxpHk/CK6nKmPawdayZ01N+o0sVHAGK0qcvTVCkBZT/1qbsJaTBPD1yf3PcN2frpwfTDBCn9GA==",
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/electron/-/electron-11.3.0.tgz",
"integrity": "sha512-MhdS0gok3wZBTscLBbYrOhLaQybCSAfkupazbK1dMP5c+84eVMxJE/QGohiWQkzs0tVFIJsAHyN19YKPbelNrQ==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
@ -1093,9 +1093,9 @@
"dev": true
},
"electron": {
"version": "9.4.3",
"resolved": "https://registry.npmjs.org/electron/-/electron-9.4.3.tgz",
"integrity": "sha512-FQjVH0jdFj9EIxpHk/CK6nKmPawdayZ01N+o0sVHAGK0qcvTVCkBZT/1qbsJaTBPD1yf3PcN2frpwfTDBCn9GA==",
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/electron/-/electron-11.3.0.tgz",
"integrity": "sha512-MhdS0gok3wZBTscLBbYrOhLaQybCSAfkupazbK1dMP5c+84eVMxJE/QGohiWQkzs0tVFIJsAHyN19YKPbelNrQ==",
"dev": true,
"requires": {
"@electron/get": "^1.0.1",
@ -1547,7 +1547,7 @@
"shapez.io-private-artifacts": {
"version": "git+ssh://git@github.com/tobspr/shapez.io-private-artifacts.git",
"integrity": "sha512-Sp3JL2gSJloqkZ5hINBTcrFomwnCD0mguuRMfJb91SkcZfZuySPEtfi7m2S+96GedA1BI6+gLygDRY217ElTFg==",
"from": "git+ssh://git@github.com/tobspr/shapez.io-private-artifacts.git",
"from": "shapez.io-private-artifacts@github:tobspr/shapez.io-private-artifacts#abi-v85",
"optional": true
},
"sprintf-js": {

View File

@ -10,9 +10,9 @@
"start": "electron --disable-direct-composition --in-process-gpu ."
},
"devDependencies": {
"electron": "9.4.3"
"electron": "11.3.0"
},
"optionalDependencies": {
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts#af8d792fe1429af95d990bba4a68362c2aa907c9"
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts#abi-v85"
}
}

View File

@ -141,10 +141,10 @@
"resolved" "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz"
"version" "0.1.4"
"electron@9.4.3":
"integrity" "sha512-FQjVH0jdFj9EIxpHk/CK6nKmPawdayZ01N+o0sVHAGK0qcvTVCkBZT/1qbsJaTBPD1yf3PcN2frpwfTDBCn9GA=="
"resolved" "https://registry.npmjs.org/electron/-/electron-9.4.3.tgz"
"version" "9.4.3"
"electron@11.3.0":
"integrity" "sha512-MhdS0gok3wZBTscLBbYrOhLaQybCSAfkupazbK1dMP5c+84eVMxJE/QGohiWQkzs0tVFIJsAHyN19YKPbelNrQ=="
"resolved" "https://registry.npmjs.org/electron/-/electron-11.3.0.tgz"
"version" "11.3.0"
dependencies:
"@electron/get" "^1.0.1"
"@types/node" "^12.0.12"
@ -498,7 +498,7 @@
dependencies:
"type-fest" "^0.13.1"
"shapez.io-private-artifacts@github:tobspr/shapez.io-private-artifacts#af8d792fe1429af95d990bba4a68362c2aa907c9":
"shapez.io-private-artifacts@github:tobspr/shapez.io-private-artifacts#abi-v85":
"integrity" "sha512-Sp3JL2gSJloqkZ5hINBTcrFomwnCD0mguuRMfJb91SkcZfZuySPEtfi7m2S+96GedA1BI6+gLygDRY217ElTFg=="
"resolved" "git+ssh://git@github.com/tobspr/shapez.io-private-artifacts.git"
"version" "0.1.0"

View File

@ -50,6 +50,9 @@ css.gulptasksCSS($, gulp, buildFolder, browserSync);
const sounds = require("./sounds");
sounds.gulptasksSounds($, gulp, buildFolder);
const localConfig = require("./local-config");
localConfig.gulptasksLocalConfig($, gulp);
const js = require("./js");
js.gulptasksJS($, gulp, buildFolder, browserSync);
@ -221,6 +224,7 @@ gulp.task(
gulp.series(
"utils.cleanup",
"utils.copyAdditionalBuildFiles",
"localConfig.findOrCreate",
"imgres.buildAtlas",
"imgres.atlasToJson",
"imgres.atlas",
@ -238,6 +242,7 @@ gulp.task(
"build.standalone.dev",
gulp.series(
"utils.cleanup",
"localConfig.findOrCreate",
"imgres.buildAtlas",
"imgres.atlasToJson",
"imgres.atlas",

18
gulp/local-config.js Normal file
View File

@ -0,0 +1,18 @@
const path = require("path");
const fs = require("fs");
const fse = require("fs-extra");
const configTemplatePath = path.join(__dirname, "../src/js/core/config.local.template.js");
const configPath = path.join(__dirname, "../src/js/core/config.local.js");
function gulptasksLocalConfig($, gulp) {
gulp.task("localConfig.findOrCreate", cb => {
if (!fs.existsSync(configPath)) {
fse.copySync(configTemplatePath, configPath);
}
cb();
});
}
module.exports = { gulptasksLocalConfig };