parent
517bd2f50b
commit
b4e614ec74
28
gulpfile.mjs
28
gulpfile.mjs
|
|
@ -1,6 +1,7 @@
|
||||||
import {dest, series, src} from 'gulp';
|
import {dest, series, src} from 'gulp';
|
||||||
import process from 'node:process';
|
import process from 'node:process';
|
||||||
import replace from 'gulp-replace';
|
import replace from 'gulp-replace';
|
||||||
|
import jsonModify from 'gulp-json-modify';
|
||||||
import {getRandomValues} from 'node:crypto';
|
import {getRandomValues} from 'node:crypto';
|
||||||
import * as dartSass from 'sass';
|
import * as dartSass from 'sass';
|
||||||
import gulpSass from 'gulp-sass';
|
import gulpSass from 'gulp-sass';
|
||||||
|
|
@ -95,9 +96,26 @@ function copyAssets() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateManifestFile() {
|
function updateManifestFile() {
|
||||||
return src('dist/system.json')
|
return src('src/system.json')
|
||||||
.pipe(replace('{{VERSION}}', process.env.VERSION))
|
.pipe(
|
||||||
.pipe(dest('dist/'))
|
jsonModify({
|
||||||
|
key: "version",
|
||||||
|
value: process.env.VERSION
|
||||||
|
})
|
||||||
|
)
|
||||||
|
.pipe(
|
||||||
|
jsonModify({
|
||||||
|
key: "manifest",
|
||||||
|
value: "https://git.macniel.online/macniel/foundry-dsa41-game/releases/download/{{VERSION}}/system.json".replace("{{VERSION}}", process.env.VERSION)
|
||||||
|
})
|
||||||
|
)
|
||||||
|
.pipe(
|
||||||
|
jsonModify({
|
||||||
|
key: "download",
|
||||||
|
value: "https://git.macniel.online/macniel/foundry-dsa41-game/releases/download/{{VERSION}}/release.zip".replace("{{VERSION}}", process.env.VERSION)
|
||||||
|
})
|
||||||
|
)
|
||||||
|
.pipe(dest('src/'))
|
||||||
}
|
}
|
||||||
|
|
||||||
async function prepareDB() {
|
async function prepareDB() {
|
||||||
|
|
@ -162,10 +180,10 @@ function buildDB() {
|
||||||
|
|
||||||
export default series(
|
export default series(
|
||||||
cleanDist,
|
cleanDist,
|
||||||
|
updateManifestFile,
|
||||||
copySource,
|
copySource,
|
||||||
copyAssets,
|
copyAssets,
|
||||||
buildStyles,
|
buildStyles,
|
||||||
prepareDB,
|
prepareDB,
|
||||||
buildDB,
|
buildDB
|
||||||
updateManifestFile
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -26,6 +26,7 @@
|
||||||
"sass-build": "^1.1.6"
|
"sass-build": "^1.1.6"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"gulp-cli": "^3.1.0"
|
"gulp-cli": "^3.1.0",
|
||||||
|
"gulp-json-modify": "^1.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue