Initial commit: GamePortrait 竖屏版 - 深色豪华主题

This commit is contained in:
li
2026-01-16 17:47:53 +08:00
commit 40976e4b45
26611 changed files with 2843638 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
module.exports = (api, options = {}, rootOptions = {}) => {
const isVue3 = (rootOptions.vueVersion === '3')
api.injectImports(api.entryFile, `import router from './router'`)
if (isVue3) {
api.transformScript(api.entryFile, require('./injectUseRouter'))
api.extendPackage({
dependencies: {
'vue-router': '^4.0.3'
}
})
} else {
api.injectRootOptions(api.entryFile, `router`)
api.extendPackage({
dependencies: {
'vue-router': '^3.5.1'
}
})
}
api.render('./template', {
historyMode: options.historyMode,
doesCompile: api.hasPlugin('babel') || api.hasPlugin('typescript'),
hasTypeScript: api.hasPlugin('typescript')
})
if (isVue3) {
api.render('./template-vue3', {
historyMode: options.historyMode,
doesCompile: api.hasPlugin('babel') || api.hasPlugin('typescript'),
hasTypeScript: api.hasPlugin('typescript')
})
}
if (api.invoking) {
if (api.hasPlugin('typescript')) {
/* eslint-disable-next-line node/no-extraneous-require */
const convertFiles = require('@vue/cli-plugin-typescript/generator/convert')
convertFiles(api)
}
}
}