feat(showcase): add version number to insights
This commit is contained in:
@@ -52,7 +52,7 @@ class Evalable {
|
||||
}
|
||||
|
||||
version(prefix, suffix) {
|
||||
return `${prefix}${readSync(path.join(__dirname, 'Version'))}${suffix}`
|
||||
return `${prefix}${__config.version}${suffix}`
|
||||
}
|
||||
|
||||
#step(location, varName) {
|
||||
|
||||
@@ -10,6 +10,7 @@ export default class EnvGenerator {
|
||||
generate() {
|
||||
return [
|
||||
`VITE_LINK="${this.#operatorConfig.link}"`,
|
||||
`VITE_VERSION=${__config.version}`,
|
||||
`VITE_TITLE="${this.#operatorConfig.title}"`,
|
||||
`VITE_FILENAME=${this.#operatorConfig.filename.replace('#', '%23')}`,
|
||||
`VITE_LOGO_FILENAME=${this.#operatorConfig.logo}`,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { fork } from 'child_process';
|
||||
import getConfig from './libs/config.js'
|
||||
import ProjectJson from './libs/project_json.js'
|
||||
import EnvGenerator from './libs/env_generator.js'
|
||||
import { write, rmdir, copy, writeSync, copyDir } from './libs/file.js'
|
||||
import { write, rmdir, copy, writeSync, copyDir, readSync } from './libs/file.js'
|
||||
import AssetsProcessor from './libs/assets_processor.js'
|
||||
import init from './libs/initializer.js'
|
||||
import directory from './libs/directory.js'
|
||||
@@ -15,7 +15,10 @@ import CharwordTable from './libs/charword_table.js';
|
||||
|
||||
async function main() {
|
||||
global.__dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
global.__config = getConfig()
|
||||
global.__config = {
|
||||
...getConfig(),
|
||||
version: readSync(path.join(__dirname, 'Version'))
|
||||
}
|
||||
|
||||
const op = process.argv[2]
|
||||
let OPERATOR_NAMES = process.argv.slice(3);
|
||||
|
||||
@@ -78,7 +78,7 @@ export default class Settings {
|
||||
this.#isInsightsInited = true
|
||||
this.#doNotTrack = doNotTrack
|
||||
if (this.#doNotTrack) return
|
||||
window.umami?.trackView(`/${import.meta.env.VITE_LINK}${isWallpaperEngine ? "?steam" : ""}`);
|
||||
window.umami?.trackView(`/${import.meta.env.VITE_LINK}${isWallpaperEngine ? "?steam&" : "?"}version=${import.meta.env.VITE_VERSION}`);
|
||||
}
|
||||
|
||||
functionInsights(functionName, toSkip = false) {
|
||||
|
||||
Reference in New Issue
Block a user