mirror of
https://shylinux.com/x/icebergs
synced 2025-04-25 17:18:05 +08:00
25 lines
443 B
Go
25 lines
443 B
Go
package node
|
|
|
|
import (
|
|
"shylinux.com/x/ice"
|
|
"shylinux.com/x/icebergs/base/cli"
|
|
"shylinux.com/x/icebergs/base/nfs"
|
|
)
|
|
|
|
const NPM = "npm"
|
|
|
|
type npm struct {
|
|
ice.Code
|
|
list string `name:"list path auto" help:"依赖库"`
|
|
}
|
|
|
|
func (s npm) Init(m *ice.Message) {
|
|
cli.IsAlpine(m.Message, NPM)
|
|
cli.IsRedhat(m.Message, NPM, "nodejs")
|
|
}
|
|
func (s npm) List(m *ice.Message) {
|
|
m.Cmdy(nfs.DIR, nfs.USR_MODULES)
|
|
}
|
|
|
|
func init() { ice.CodeCtxCmd(npm{}) }
|