const ci = require('miniprogram-ci')
const path = require('path')
const projectConfig = require('绝对地址/项目/project.config.json')
console.log('加载完成',projectConfig);
(async () => {
const project = new ci.Project({
appid: projectConfig.appid,
type: projectConfig.compileType,
projectPath: '绝对地址/项目/',
privateKeyPath: '绝对地址/项目/deploy/weapp.key',
ignores: ['node_modules*'],
})
console.log('构建完info')
const warning = await ci.packNpm(project, {
reporter: (infos) => {
console.log(infos, 'asdasd')
}
})
console.log(warning, '异常信息')
const uploadResult = await ci.upload({
project,
version: '2.0',
desc: 'hello',
setting: {
es6: true,
},
onProgressUpdate: console.log,
})
console.log(uploadResult)
})()
node:internal/process/promises:288
triggerUncaughtException(err, true );
^
CustomError: no support compile for miniprogram
Node.js v18.14.1
type: projectConfig.compileType, 这里要写死,不能从配置里面读取