Skip to content

Commit

Permalink
🚀 1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ossso committed Jul 17, 2024
1 parent 3fd1023 commit 54f00ff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions dist/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,12 @@ const deploy = async ({
// 规则
rule,
config,
callback,
}) => {
const {
deployBefore,
deployAfter,
} = callback || {};
const startTime = Date.now();
console.log(chalk__default["default"].white(` 正在扫描目录[${dir}] `));
const {
Expand Down Expand Up @@ -286,6 +291,9 @@ const deploy = async ({
width: Math.min(total * 2, 30),
});

if (typeof deployBefore === 'function') {
await deployBefore(files, tasks, transferToTasks);
}
try {
// OSS上传
if (tasks.oss.length) {
Expand Down Expand Up @@ -316,6 +324,9 @@ const deploy = async ({
console.log(chalk__default["default"].bgRed(' 部署异常 '));
throw error;
}
if (typeof deployAfter === 'function') {
await deployAfter(files, tasks);
}
console.log(chalk__default["default"].bgBlue(' 部署完成 '));
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ossso/front-deploy",
"version": "1.2.0",
"version": "1.2.3",
"description": "前端内容自动化部署工具",
"main": "index.js",
"exports": {
Expand Down

0 comments on commit 54f00ff

Please sign in to comment.