fix(directory): fixed an issue where _assets is not build by default
This commit is contained in:
@@ -1 +1 @@
|
|||||||
1.2.8
|
1.2.10
|
||||||
@@ -5,8 +5,11 @@ import { defineConfig } from 'vite'
|
|||||||
import assert from 'assert'
|
import assert from 'assert'
|
||||||
import react from '@vitejs/plugin-react-swc'
|
import react from '@vitejs/plugin-react-swc'
|
||||||
import getConfig from './libs/config.js'
|
import getConfig from './libs/config.js'
|
||||||
import { rmdir, writeSync } from './libs/file.js'
|
import { rmdir } from './libs/file.js'
|
||||||
import { increase } from './libs/version.js'
|
import { increase } from './libs/version.js'
|
||||||
|
import Music from './libs/music.js';
|
||||||
|
import Background from './libs/background.js'
|
||||||
|
import directory from './libs/directory.js'
|
||||||
import { PerfseePlugin } from '@perfsee/rollup'
|
import { PerfseePlugin } from '@perfsee/rollup'
|
||||||
|
|
||||||
global.__projectRoot = path.dirname(fileURLToPath(import.meta.url))
|
global.__projectRoot = path.dirname(fileURLToPath(import.meta.url))
|
||||||
@@ -51,14 +54,15 @@ class ViteRunner {
|
|||||||
}
|
}
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
return
|
return null
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
async start() {
|
||||||
const configObj = this.config
|
const configObj = this.config
|
||||||
const viteConfig = configObj.data;
|
const viteConfig = configObj.data;
|
||||||
|
|
||||||
switch (this.#mode) {
|
switch (this.#mode) {
|
||||||
case 'dev':
|
case 'dev':
|
||||||
this.#dev(viteConfig)
|
this.#dev(viteConfig)
|
||||||
@@ -191,9 +195,18 @@ class ViteRunner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
if (process.env.npm_lifecycle_event.includes('vite')) return
|
if (process.env.npm_lifecycle_event.includes('vite')) {
|
||||||
|
global.__config = getConfig()
|
||||||
|
const background = new Background()
|
||||||
|
await background.process()
|
||||||
|
const backgrounds = ['operator_bg.png', ...background.files]
|
||||||
|
const { musicMapping } = Music()
|
||||||
|
|
||||||
|
directory({ backgrounds, musicMapping })
|
||||||
|
return
|
||||||
|
}
|
||||||
const runner = new ViteRunner()
|
const runner = new ViteRunner()
|
||||||
runner.start()
|
await runner.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user