Skip to content

Commit

Permalink
action
Browse files Browse the repository at this point in the history
  • Loading branch information
wszgrcy committed Mar 22, 2024
1 parent 30b32db commit 25030b7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions script/sync-localize.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScriptFunction, completePromise } from '@code-recycle/cli';
import type { ScriptFunction } from '@code-recycle/cli';
let fn: ScriptFunction = async (util, rule, host, injector) => {
let data = await rule.os.gitClone(
'https://github.com/angular/angular.git',
Expand All @@ -20,7 +20,11 @@ let fn: ScriptFunction = async (util, rule, host, injector) => {
if (key.endsWith('bazel') || key.includes('/test')) {
continue;
}
await completePromise(host.write(util.path.join(util.path.normalize('./localize'), key), fileObj[key]));
await new Promise((res) => {
host.write(util.path.join(util.path.normalize('./localize'), key), fileObj[key]).subscribe({
complete: () => res(undefined),
});
});
}
let list = await util.changeList([
{
Expand Down

0 comments on commit 25030b7

Please sign in to comment.