Skip to content

Commit

Permalink
feat: 添加预览方法、格式化文件上传列表
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario34 committed Mar 7, 2022
1 parent 7970c1d commit b97c7bb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rollup.config.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default defineConfig({
input: 'src/index.ts',
output: {
format: 'module',
file: 'dist/index.js',
file: 'lib/index.js',
},
watch: {
include: './src/**/*.ts',
Expand Down
14 changes: 10 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export interface Options {
setting: ValueFn<MiniProgramCI.ICompileSettings>
}

export default async (option: Options) => {
export default (option: Options) => {
const info: Info = { git: utils.getGitInfo() }
const {
config: setupConfig, setting: uploadSetting,
Expand All @@ -79,13 +79,19 @@ export default async (option: Options) => {
es6: true,
es7: true,
},
onProgressUpdate: (file: MiniProgramCI.ITaskStatus) => {
if (file.status === 'done') {
log(chalk.greenBright(`- ${file.message}`))
}
},
}
devLog(config)
devLog(uploadConfig)
devLog(argv)

const project = new ci.Project(config)
const uploadResult = await ci.upload({ project, ...uploadConfig })

log(uploadResult)
ci.upload({ project, ...uploadConfig }).then(uploadResult => {
log(uploadResult)
})
ci.preview({ project, ...uploadConfig })
}

0 comments on commit b97c7bb

Please sign in to comment.