1
0
mirror of https://shylinux.com/x/icebergs synced 2025-05-04 12:27:01 +08:00
This commit is contained in:
harveyshao 2022-08-09 11:00:48 +08:00
parent e232ffc59e
commit e2e04b2b3f
3 changed files with 5 additions and 5 deletions

View File

@ -374,10 +374,10 @@ func init() {
PP(ice.REQUIRE): {Name: "/require/shylinux.com/x/volcanos/proto.js", Help: "代码库", Hand: func(m *ice.Message, arg ...string) { PP(ice.REQUIRE): {Name: "/require/shylinux.com/x/volcanos/proto.js", Help: "代码库", Hand: func(m *ice.Message, arg ...string) {
_share_repos(m, path.Join(arg[0], arg[1], arg[2]), arg[3:]...) _share_repos(m, path.Join(arg[0], arg[1], arg[2]), arg[3:]...)
}}, }},
PP(ice.REQUIRE, ice.LIB, ice.NODE_MODULES): {Name: "/require/lib/node_modules/", Help: "依赖库", Hand: func(m *ice.Message, arg ...string) { PP(ice.REQUIRE, ice.PAGE, ice.NODE_MODULES): {Name: "/require/page/node_modules/", Help: "依赖库", Hand: func(m *ice.Message, arg ...string) {
p := path.Join(ice.USR_VOLCANOS, ice.LIB, ice.NODE_MODULES, path.Join(arg...)) p := path.Join(ice.USR_VOLCANOS, ice.PAGE, ice.NODE_MODULES, path.Join(arg...))
if !nfs.ExistsFile(m, p) { if !nfs.ExistsFile(m, p) {
m.Cmd(cli.SYSTEM, "npm", "install", arg[0], kit.Dict(cli.CMD_DIR, path.Join(ice.USR_VOLCANOS, ice.LIB))) m.Cmd(cli.SYSTEM, "npm", "install", arg[0], kit.Dict(cli.CMD_DIR, path.Join(ice.USR_VOLCANOS, ice.PAGE)))
} }
m.RenderDownload(p) m.RenderDownload(p)
}}, }},

View File

@ -87,13 +87,13 @@ func _webpack_cache(m *ice.Message, dir string, write bool) {
p := value[nfs.PATH] p := value[nfs.PATH]
switch kit.Ext(p) { switch kit.Ext(p) {
case nfs.CSS: case nfs.CSS:
_webpack_css(m, css, js, path.Join(ice.REQUIRE, ice.LIB, ice.NODE_MODULES, p)) _webpack_css(m, css, js, path.Join(ice.REQUIRE, ice.PAGE, ice.NODE_MODULES, p))
return return
case nfs.JS: case nfs.JS:
default: default:
p = p + "/lib/" + p + ".js" p = p + "/lib/" + p + ".js"
} }
_webpack_node(m, js, path.Join(ice.REQUIRE, ice.LIB, ice.NODE_MODULES, p)) _webpack_node(m, js, path.Join(ice.REQUIRE, ice.PAGE, ice.NODE_MODULES, p))
}) })
} }
func _webpack_build(m *ice.Message, file string) { func _webpack_build(m *ice.Message, file string) {