parent
6206285453
commit
c6a6e17da4
139
tools/package-lock.json
generated
139
tools/package-lock.json
generated
@ -47,7 +47,6 @@
|
|||||||
"filesize": "^10.1.1",
|
"filesize": "^10.1.1",
|
||||||
"gray-matter": "^4.0.3",
|
"gray-matter": "^4.0.3",
|
||||||
"gulp": "^5.0.0",
|
"gulp": "^5.0.0",
|
||||||
"gulp-filter": "^9.0.1",
|
|
||||||
"gulp-rename": "^2.0.0",
|
"gulp-rename": "^2.0.0",
|
||||||
"gulp-zip": "^6.0.0",
|
"gulp-zip": "^6.0.0",
|
||||||
"inquirer": "^9.2.20",
|
"inquirer": "^9.2.20",
|
||||||
@ -1226,18 +1225,6 @@
|
|||||||
"url": "https://github.com/sponsors/epoberezkin"
|
"url": "https://github.com/sponsors/epoberezkin"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ansi-colors": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-wrap": "^0.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/ansi-escapes": {
|
"node_modules/ansi-escapes": {
|
||||||
"version": "4.3.2",
|
"version": "4.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
|
||||||
@ -1277,15 +1264,6 @@
|
|||||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ansi-wrap": {
|
|
||||||
"version": "0.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz",
|
|
||||||
"integrity": "sha512-ZyznvL8k/FZeQHr2T6LzcJ/+vBApDnMNZvfVFy3At0knswWd6rJ3/0Hhmpu8oqa6C92npmozs890sX9Dl6q+Qw==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/anymatch": {
|
"node_modules/anymatch": {
|
||||||
"version": "3.1.3",
|
"version": "3.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
|
||||||
@ -1323,18 +1301,6 @@
|
|||||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
|
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/array-differ": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/array-differ/-/array-differ-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-Q6VPTLMsmXZ47ENG3V+wQyZS1ZxXMxFyYzA+Z/GMrJ6yIutAIEf9wTyroTzmGjNfox9/h3GdGBCVh43GVFx4Uw==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/array-each": {
|
"node_modules/array-each": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
|
||||||
@ -3190,45 +3156,6 @@
|
|||||||
"node": ">=10.13.0"
|
"node": ">=10.13.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/gulp-filter": {
|
|
||||||
"version": "9.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-9.0.1.tgz",
|
|
||||||
"integrity": "sha512-knVYL8h9bfYIeft3VokVTkuaWJkQJMrFCS3yVjZQC6BGg+1dZFoeUY++B9D2X4eFpeNTx9StWK0qnDby3NO3PA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"multimatch": "^7.0.0",
|
|
||||||
"plugin-error": "^2.0.1",
|
|
||||||
"slash": "^5.1.0",
|
|
||||||
"streamfilter": "^3.0.0",
|
|
||||||
"to-absolute-glob": "^3.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"gulp": ">=4"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"gulp": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/gulp-filter/node_modules/slash": {
|
|
||||||
"version": "5.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz",
|
|
||||||
"integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.16"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/gulp-plugin-extras": {
|
"node_modules/gulp-plugin-extras": {
|
||||||
"version": "0.3.0",
|
"version": "0.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/gulp-plugin-extras/-/gulp-plugin-extras-0.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/gulp-plugin-extras/-/gulp-plugin-extras-0.3.0.tgz",
|
||||||
@ -4070,35 +3997,6 @@
|
|||||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/multimatch": {
|
|
||||||
"version": "7.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/multimatch/-/multimatch-7.0.0.tgz",
|
|
||||||
"integrity": "sha512-SYU3HBAdF4psHEL/+jXDKHO95/m5P2RvboHT2Y0WtTttvJLP4H/2WS9WlQPFvF6C8d6SpLw8vjCnQOnVIVOSJQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"array-differ": "^4.0.0",
|
|
||||||
"array-union": "^3.0.1",
|
|
||||||
"minimatch": "^9.0.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/multimatch/node_modules/array-union": {
|
|
||||||
"version": "3.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/array-union/-/array-union-3.0.1.tgz",
|
|
||||||
"integrity": "sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/mustache": {
|
"node_modules/mustache": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz",
|
||||||
@ -4428,18 +4326,6 @@
|
|||||||
"url": "https://github.com/sponsors/jonschlinkert"
|
"url": "https://github.com/sponsors/jonschlinkert"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/plugin-error": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-2.0.1.tgz",
|
|
||||||
"integrity": "sha512-zMakqvIDyY40xHOvzXka0kUvf40nYIuwRE8dWhti2WtjQZ31xAgBZBhxsK7vK3QbRXS1Xms/LO7B5cuAsfB2Gg==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-colors": "^1.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10.13.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/prelude-ls": {
|
"node_modules/prelude-ls": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
|
||||||
@ -4998,18 +4884,6 @@
|
|||||||
"integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==",
|
"integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/streamfilter": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/streamfilter/-/streamfilter-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-kvKNfXCmUyC8lAXSSHCIXBUlo/lhsLcCU/OmzACZYpRUdtKIH68xYhm/+HI15jFJYtNJGYtCgn2wmIiExY1VwA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"readable-stream": "^3.0.6"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8.12.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/streamx": {
|
"node_modules/streamx": {
|
||||||
"version": "2.16.1",
|
"version": "2.16.1",
|
||||||
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.16.1.tgz",
|
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.16.1.tgz",
|
||||||
@ -5183,19 +5057,6 @@
|
|||||||
"node": ">=0.6.0"
|
"node": ">=0.6.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/to-absolute-glob": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-loO/XEWTRqpfcpI7+Jr2RR2Umaaozx1t6OSVWtMi0oy5F/Fxg3IC+D/TToDnxyAGs7uZBGT/6XmyDUxgsObJXA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"is-absolute": "^1.0.0",
|
|
||||||
"is-negated-glob": "^1.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/to-regex-range": {
|
"node_modules/to-regex-range": {
|
||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||||
|
@ -57,7 +57,6 @@
|
|||||||
"filesize": "^10.1.1",
|
"filesize": "^10.1.1",
|
||||||
"gray-matter": "^4.0.3",
|
"gray-matter": "^4.0.3",
|
||||||
"gulp": "^5.0.0",
|
"gulp": "^5.0.0",
|
||||||
"gulp-filter": "^9.0.1",
|
|
||||||
"gulp-rename": "^2.0.0",
|
"gulp-rename": "^2.0.0",
|
||||||
"gulp-zip": "^6.0.0",
|
"gulp-zip": "^6.0.0",
|
||||||
"inquirer": "^9.2.20",
|
"inquirer": "^9.2.20",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import gulp, { dest, symlink } from "gulp";
|
import { src, dest, series } from "gulp";
|
||||||
import {
|
import {
|
||||||
clientDestDirectory,
|
clientDestDirectory,
|
||||||
modpackManifest,
|
modpackManifest,
|
||||||
@ -11,7 +11,6 @@ import { deleteAsync } from "del";
|
|||||||
import { createModList, ModFileInfo } from "../misc/createModList.ts";
|
import { createModList, ModFileInfo } from "../misc/createModList.ts";
|
||||||
import dedent from "dedent-js";
|
import dedent from "dedent-js";
|
||||||
import { cleanupVersion } from "#utils/util.ts";
|
import { cleanupVersion } from "#utils/util.ts";
|
||||||
import filter from "gulp-filter";
|
|
||||||
|
|
||||||
async function clientCleanUp() {
|
async function clientCleanUp() {
|
||||||
return deleteAsync(upath.join(clientDestDirectory, "*"), { force: true });
|
return deleteAsync(upath.join(clientDestDirectory, "*"), { force: true });
|
||||||
@ -65,41 +64,37 @@ async function exportModpackManifest() {
|
|||||||
* Copies the license file.
|
* Copies the license file.
|
||||||
*/
|
*/
|
||||||
async function copyClientLicense() {
|
async function copyClientLicense() {
|
||||||
return gulp.src("../LICENSE").pipe(gulp.dest(clientDestDirectory));
|
return src("../LICENSE").pipe(dest(clientDestDirectory));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies the update notes file.
|
* Copies the update notes file.
|
||||||
*/
|
*/
|
||||||
function copyClientUpdateNotes() {
|
function copyClientUpdateNotes() {
|
||||||
return gulp
|
return src("../UPDATENOTES.md", { allowEmpty: true }).pipe(
|
||||||
.src("../UPDATENOTES.md", { allowEmpty: true })
|
dest(clientDestDirectory),
|
||||||
.pipe(gulp.dest(clientDestDirectory));
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies the changelog file.
|
* Copies the changelog file.
|
||||||
*/
|
*/
|
||||||
function copyClientChangelog() {
|
function copyClientChangelog() {
|
||||||
return gulp
|
return src(
|
||||||
.src(upath.join(buildConfig.buildDestinationDirectory, "CHANGELOG.md"))
|
upath.join(buildConfig.buildDestinationDirectory, "CHANGELOG.md"),
|
||||||
.pipe(dest(clientDestDirectory));
|
).pipe(dest(clientDestDirectory));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies modpack overrides.
|
* Copies modpack overrides.
|
||||||
*/
|
*/
|
||||||
function copyClientOverrides() {
|
function copyClientOverrides() {
|
||||||
const f = filter((f) => !f.isDirectory());
|
return src(buildConfig.copyFromSharedClientGlobs, {
|
||||||
return gulp
|
cwd: sharedDestDirectory,
|
||||||
.src(buildConfig.copyFromSharedClientGlobs, {
|
allowEmpty: true,
|
||||||
cwd: sharedDestDirectory,
|
resolveSymlinks: true,
|
||||||
allowEmpty: true,
|
encoding: false,
|
||||||
resolveSymlinks: true,
|
}).pipe(dest(upath.join(clientDestDirectory, "overrides")));
|
||||||
encoding: false,
|
|
||||||
})
|
|
||||||
.pipe(f)
|
|
||||||
.pipe(symlink(upath.join(clientDestDirectory, "overrides")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -224,7 +219,7 @@ function getTickCross(bool: boolean): string {
|
|||||||
return '<td class="redCross">✖</td>';
|
return '<td class="redCross">✖</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
export default gulp.series(
|
export default series(
|
||||||
clientCleanUp,
|
clientCleanUp,
|
||||||
createClientDirs,
|
createClientDirs,
|
||||||
copyClientOverrides,
|
copyClientOverrides,
|
||||||
|
@ -6,9 +6,8 @@ import {
|
|||||||
} from "#globals";
|
} from "#globals";
|
||||||
import * as upath from "upath";
|
import * as upath from "upath";
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import gulp, { series, src, symlink } from "gulp";
|
import { dest, series, src } from "gulp";
|
||||||
import buildConfig from "#buildConfig";
|
import buildConfig from "#buildConfig";
|
||||||
import filter from "gulp-filter";
|
|
||||||
|
|
||||||
async function mmcCleanUp() {
|
async function mmcCleanUp() {
|
||||||
if (fs.existsSync(mmcDestDirectory)) {
|
if (fs.existsSync(mmcDestDirectory)) {
|
||||||
@ -29,37 +28,34 @@ async function createMMCDirs() {
|
|||||||
* Copies the update notes file.
|
* Copies the update notes file.
|
||||||
*/
|
*/
|
||||||
function copyMMCUpdateNotes() {
|
function copyMMCUpdateNotes() {
|
||||||
return gulp
|
return src("../UPDATENOTES.md", { allowEmpty: true }).pipe(
|
||||||
.src("../UPDATENOTES.md", { allowEmpty: true })
|
dest(mmcDestDirectory),
|
||||||
.pipe(gulp.dest(mmcDestDirectory));
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies the license file.
|
* Copies the license file.
|
||||||
*/
|
*/
|
||||||
async function copyMMCLicense() {
|
async function copyMMCLicense() {
|
||||||
return gulp.src("../LICENSE").pipe(gulp.dest(mmcDestDirectory));
|
return src("../LICENSE").pipe(dest(mmcDestDirectory));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies the changelog file.
|
* Copies the changelog file.
|
||||||
*/
|
*/
|
||||||
function copyMMCChangelog() {
|
function copyMMCChangelog() {
|
||||||
return gulp
|
return src(
|
||||||
.src(upath.join(buildConfig.buildDestinationDirectory, "CHANGELOG.md"))
|
upath.join(buildConfig.buildDestinationDirectory, "CHANGELOG.md"),
|
||||||
.pipe(gulp.dest(mmcDestDirectory));
|
).pipe(dest(mmcDestDirectory));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies modpack overrides.
|
* Copies modpack overrides.
|
||||||
*/
|
*/
|
||||||
function copyOverrides() {
|
function copyOverrides() {
|
||||||
const f = filter((f) => !f.isDirectory());
|
|
||||||
return src(upath.join(clientDestDirectory, "**/*"), {
|
return src(upath.join(clientDestDirectory, "**/*"), {
|
||||||
resolveSymlinks: false,
|
resolveSymlinks: false,
|
||||||
})
|
}).pipe(dest(upath.join(mmcDestDirectory)));
|
||||||
.pipe(f)
|
|
||||||
.pipe(symlink(upath.join(mmcDestDirectory)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -77,14 +73,11 @@ async function renameOverrides() {
|
|||||||
* Copies client & shared mods.
|
* Copies client & shared mods.
|
||||||
*/
|
*/
|
||||||
async function copyMMCModJars() {
|
async function copyMMCModJars() {
|
||||||
const f = filter((f) => !f.isDirectory());
|
|
||||||
return src(["*", upath.join("client", "*")], {
|
return src(["*", upath.join("client", "*")], {
|
||||||
cwd: modDestDirectory,
|
cwd: modDestDirectory,
|
||||||
resolveSymlinks: true,
|
resolveSymlinks: true,
|
||||||
encoding: false,
|
encoding: false,
|
||||||
})
|
}).pipe(dest(upath.join(mmcDestDirectory, ".minecraft", "mods")));
|
||||||
.pipe(f)
|
|
||||||
.pipe(symlink(upath.join(mmcDestDirectory, ".minecraft", "mods")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createMMCConfig() {
|
async function createMMCConfig() {
|
||||||
|
@ -2,7 +2,7 @@ import upath from "upath";
|
|||||||
import unzip from "unzipper";
|
import unzip from "unzipper";
|
||||||
import through from "through2";
|
import through from "through2";
|
||||||
import mustache from "mustache";
|
import mustache from "mustache";
|
||||||
import gulp, { src, dest, symlink } from "gulp";
|
import { src, dest, series } from "gulp";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import buildConfig from "#buildConfig";
|
import buildConfig from "#buildConfig";
|
||||||
import { ForgeProfile } from "#types/forgeProfile.ts";
|
import { ForgeProfile } from "#types/forgeProfile.ts";
|
||||||
@ -24,7 +24,6 @@ import {
|
|||||||
updateServerProperties,
|
updateServerProperties,
|
||||||
} from "../misc/transformFiles.ts";
|
} from "../misc/transformFiles.ts";
|
||||||
import logInfo, { logWarn } from "#utils/log.ts";
|
import logInfo, { logWarn } from "#utils/log.ts";
|
||||||
import filter from "gulp-filter";
|
|
||||||
|
|
||||||
let g_forgeJar: string | undefined = undefined;
|
let g_forgeJar: string | undefined = undefined;
|
||||||
|
|
||||||
@ -170,36 +169,30 @@ async function downloadMinecraftServer() {
|
|||||||
serverDestDirectory,
|
serverDestDirectory,
|
||||||
`minecraft_server.${versionManifest.id}.jar`,
|
`minecraft_server.${versionManifest.id}.jar`,
|
||||||
);
|
);
|
||||||
await fs.promises.symlink(upath.resolve(serverJar.cachePath), dest);
|
await fs.promises.copyFile(upath.resolve(serverJar.cachePath), dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies server & shared mods.
|
* Copies server & shared mods.
|
||||||
*/
|
*/
|
||||||
async function copyServerMods() {
|
async function copyServerMods() {
|
||||||
const f = filter((f) => !f.isDirectory());
|
|
||||||
return src(["*", upath.join("server", "*")], {
|
return src(["*", upath.join("server", "*")], {
|
||||||
cwd: modDestDirectory,
|
cwd: modDestDirectory,
|
||||||
resolveSymlinks: true,
|
resolveSymlinks: true,
|
||||||
encoding: false,
|
encoding: false,
|
||||||
})
|
}).pipe(dest(upath.join(serverDestDirectory, "mods")));
|
||||||
.pipe(f)
|
|
||||||
.pipe(symlink(upath.join(serverDestDirectory, "mods")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies modpack overrides.
|
* Copies modpack overrides.
|
||||||
*/
|
*/
|
||||||
function copyServerOverrides() {
|
function copyServerOverrides() {
|
||||||
const f = filter((f) => !f.isDirectory());
|
|
||||||
return src(buildConfig.copyFromSharedServerGlobs, {
|
return src(buildConfig.copyFromSharedServerGlobs, {
|
||||||
cwd: sharedDestDirectory,
|
cwd: sharedDestDirectory,
|
||||||
allowEmpty: true,
|
allowEmpty: true,
|
||||||
resolveSymlinks: true,
|
resolveSymlinks: true,
|
||||||
encoding: false,
|
encoding: false,
|
||||||
})
|
}).pipe(dest(upath.join(serverDestDirectory)));
|
||||||
.pipe(f)
|
|
||||||
.pipe(symlink(upath.join(serverDestDirectory)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -273,7 +266,7 @@ const updateBuildServerProperties = async () => {
|
|||||||
await updateServerProperties(serverDestDirectory);
|
await updateServerProperties(serverDestDirectory);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default gulp.series(
|
export default series(
|
||||||
serverCleanUp,
|
serverCleanUp,
|
||||||
createServerDirs,
|
createServerDirs,
|
||||||
downloadForge,
|
downloadForge,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user