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