From 00923fdbc725bb7e07594d3fbaf58404c47349b9 Mon Sep 17 00:00:00 2001 From: shylinux Date: Fri, 22 Oct 2021 16:19:02 +0800 Subject: [PATCH] opt some --- base/cli/runtime.go | 2 +- core/chat/header.go | 4 ++++ core/code/publish.go | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/base/cli/runtime.go b/base/cli/runtime.go index 5c820ca7..038fda9b 100644 --- a/base/cli/runtime.go +++ b/base/cli/runtime.go @@ -110,7 +110,7 @@ const ( DARWIN = "darwin" WINDOWS = "windows" AMD64 = "amd64" - I386 = "i386" + I386 = "386" ARM = "arm" ) const ( diff --git a/core/chat/header.go b/core/chat/header.go index b4920218..df63e0a2 100644 --- a/core/chat/header.go +++ b/core/chat/header.go @@ -119,6 +119,10 @@ func init() { code.WEBPACK: {Name: "webpack", Help: "打包页面", Hand: func(m *ice.Message, arg ...string) { m.Cmdy(code.WEBPACK, mdb.CREATE, m.OptionSimple(kit.MDB_NAME)) + p := path.Join("src/release", ice.GO_MOD) + if _, e := os.Stat(p); e == nil { + m.Cmd(nfs.COPY, ice.GO_MOD, p) + } }}, "unpack": {Name: "unpack", Help: "开发模式", Hand: func(m *ice.Message, arg ...string) { m.Cmdy(code.WEBPACK, "unpack") diff --git a/core/code/publish.go b/core/code/publish.go index 3de765bb..fa4a1f42 100644 --- a/core/code/publish.go +++ b/core/code/publish.go @@ -127,8 +127,8 @@ func init() { m.Toast("打包成功") m.ProcessHold() }}, - mdb.REMOVE: {Name: "remove", Help: "删除", Hand: func(m *ice.Message, arg ...string) { - p := m.Option(cli.CMD_DIR, m.Conf(PUBLISH, kit.META_PATH)) + nfs.TRASH: {Name: "trash", Help: "删除", Hand: func(m *ice.Message, arg ...string) { + p := m.Option(cli.CMD_DIR, m.Config(kit.MDB_PATH)) os.Remove(path.Join(p, m.Option(kit.MDB_PATH))) }}, mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) {