0.0.3 • Published 6 years ago

tencent-cms-hgm v0.0.3

Weekly downloads
11
License
-
Repository
-
Last release
6 years ago

cms发布命令

安装步骤:

  1. 选择一个空目录: git下载git clone http://git.code.oa.com/skeetershi/tecent-cms-hgm,或者点击页面中的download按钮下载zip包;
  2. 解压后,安装所依赖的包: npm install --save-dev;
  3. 设置为全局变量: npm link

可以正常使用hgm进行操作了。

hgm init : 在项目的根目录中初始化配置文件 hgm login : 登录, 输入英文名和PIN+TOKEN

hgm push
推送目录中所有的资源,会把所有的js文件推送至js目录,css文件推送至css目录,图片文件推送至img目录,其他文件推送至data目录。这里进行扁平化上传,不会自动创建更多的目录

hgm article
这个命令需要自己另外配置:

{
    "localPath": {},
    "staticPath": {},

    "article": {
        "data": "dist/index.html", // 要上传的文件
        "testId": 65124,
        "preId": 65124,
        "prodId": 65124,
        "catalog": "invite",
        "site": "news"
    }
}

执行命令时,默认会将data中的文件推送至testId对应的页面片中,如果想要推送到其他的id中,需要额外的参数:

  • hgm article test 推送至testId对应的页面片
  • hgm artilce pre 推送至preId对应的页面片
  • hgm article prod 推送至prodId对应的页面片

同时也可以单独使用: hgm article -f 本地文件目录 -a cms页面片的ID,则hgm就会把这个文件里的内容推送到cms里id对应的页面片

hgm article -f ./dist/index.html -a 65124

hgm artcreate

创建页面片