调整自动引入

This commit is contained in:
aixianling
2024-10-31 16:22:41 +08:00
parent 37c4ff83cb
commit d6a5246f17
53 changed files with 15 additions and 2 deletions

14
bin/comps.js Normal file
View File

@@ -0,0 +1,14 @@
const { findPages, copyFiles } = require('./tools')
const fse = require('fs-extra')
function handleComps() {
findPages('components', file => {
const match = file.match(/(?<pre>(Ai|V))(?<name>[^\\\/]+)\.vue$/)
if(match?.groups){
const {pre,name} = match.groups
const dest = `components/${pre}${name}`
fse.emptyDirSync(dest)
fse.moveSync(file,`${dest}/${pre}${name}.vue`)
}
})
}
handleComps()