Skip to content

Commit

Permalink
chore: sync tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanVor committed Nov 21, 2024
1 parent 5c44a17 commit 54252eb
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions scripts/build_services/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import path from 'path';
import fs from 'fs';

import { promisify } from 'node:util';
import child_process from 'node:child_process';

const exec = promisify(child_process.exec);
import { exec } from 'child_process';

const CLIENTS_PATH = path.resolve('./clients');

Expand All @@ -13,14 +10,11 @@ const getServices = () => {
return files.filter((file) => file.isDirectory()).map((file) => file.name);
};

const buildService = async (serviceName: string) => {
await exec(
`cross-env NODE_OPTIONS="--max-old-space-size=4096" tsc -p ${CLIENTS_PATH}/${serviceName}`,
);
const buildService = (serviceName: string) => {
exec(`NODE_OPTIONS="--max-old-space-size=4096" tsc -p ${CLIENTS_PATH}/${serviceName}`);
};

(async () => {
const serviceList = getServices();

await Promise.all(serviceList.map(buildService));
serviceList.forEach(buildService);
})();

0 comments on commit 54252eb

Please sign in to comment.