mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-10-04 07:46:31 +08:00
打包命令
This commit is contained in:
@@ -8,7 +8,15 @@ const releaseRelativePath = '../frontend'
|
|||||||
const distPath = path.resolve(cwd, 'dist')
|
const distPath = path.resolve(cwd, 'dist')
|
||||||
const releasePath = path.resolve(cwd, releaseRelativePath)
|
const releasePath = path.resolve(cwd, releaseRelativePath)
|
||||||
|
|
||||||
|
const goProjectPath = path.resolve(cwd, '../server')
|
||||||
|
|
||||||
async function build() {
|
async function build() {
|
||||||
|
await execaCommand('goreleaser release --snapshot --clean', {
|
||||||
|
stdio: 'inherit',
|
||||||
|
encoding: 'utf-8',
|
||||||
|
cwd: goProjectPath
|
||||||
|
})
|
||||||
|
|
||||||
await execaCommand('vite build', { stdio: 'inherit', encoding: 'utf-8', cwd })
|
await execaCommand('vite build', { stdio: 'inherit', encoding: 'utf-8', cwd })
|
||||||
if (existsSync(releasePath)) {
|
if (existsSync(releasePath)) {
|
||||||
await remove(releasePath)
|
await remove(releasePath)
|
||||||
|
@@ -22,7 +22,7 @@ func LoginRoute(rg *gin.RouterGroup) {
|
|||||||
handle := loginHandler{Service: service}
|
handle := loginHandler{Service: service}
|
||||||
|
|
||||||
rg = rg.Group("/system", middleware.TokenAuth())
|
rg = rg.Group("/system", middleware.TokenAuth())
|
||||||
rg.POST("/login", handle.login, middleware.RecordLog("后台登录"))
|
rg.POST("/login", handle.login)
|
||||||
rg.POST("/logout", handle.logout)
|
rg.POST("/logout", handle.logout)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user