怎样模拟微信工具的上传,将本地开发好的小程序上传微信服务器?
发布于 5 年前 作者 daitao 11960 次浏览 来自 官方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 回复

你得先学会nodejs

回到顶部