怎样模拟微信工具的上传,将本地开发好的小程序上传微信服务器?

发布于 7 年前作者 daitao12208 次浏览最后编辑 7 年前来自 issues

从文档中 https://developers.weixin.qq.com/miniprogram/dev/devtools/ci.html

需要运行脚本 npm install miniprogram-ci --save
脚本运行完成后,在本地生成了C:\Users\Administrator\node_modules
const ci = require('miniprogram-ci')//这块具体怎么引进来
;(async () => {
  const project = new ci.Project({
    appid: 'wxsomeappid',
    type: 'miniProgram',
    projectPath: 'the/project/path',//项目在d盘下,这块路径怎么写
    privateKeyPath: 'the/path/to/privatekey',//私钥在本地d盘,这块路径怎么写
    ignores: ['node_modules/**/*'],
  })
  const uploadResult = await ci.upload({
    project,
    version: '1.1.1',
    desc: 'hello',
    setting: {
      es6: true,
    },
    onProgressUpdate: console.log,
  })
  console.log(uploadResult)
})()
1 回复
jing65
jing651 楼5 年前

你得先学会nodejs