From c9d5c64f98c1f1fe7950de60c58edeaf3ace070d Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 27 Aug 2018 13:28:49 +0200 Subject: replace fs by fs-extra to prevent EMFILE error --- scripts/generate-code-contributors.ts | 2 +- scripts/i18n/create-custom-files.ts | 2 +- scripts/i18n/xliff2json.ts | 2 +- scripts/parse-log.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/generate-code-contributors.ts b/scripts/generate-code-contributors.ts index 0cce62180..3d37372d1 100755 --- a/scripts/generate-code-contributors.ts +++ b/scripts/generate-code-contributors.ts @@ -1,5 +1,5 @@ import { doRequest } from '../server/helpers/requests' -import { readFileSync } from 'fs' +import { readFileSync } from 'fs-extra' run() .then(() => process.exit(0)) diff --git a/scripts/i18n/create-custom-files.ts b/scripts/i18n/create-custom-files.ts index c4f8411e1..eed3182a6 100755 --- a/scripts/i18n/create-custom-files.ts +++ b/scripts/i18n/create-custom-files.ts @@ -1,5 +1,5 @@ import * as jsToXliff12 from 'xliff/jsToXliff12' -import { writeFile } from 'fs' +import { writeFile } from 'fs-extra' import { join } from 'path' import { buildLanguages, diff --git a/scripts/i18n/xliff2json.ts b/scripts/i18n/xliff2json.ts index ed6854514..7e6de2893 100755 --- a/scripts/i18n/xliff2json.ts +++ b/scripts/i18n/xliff2json.ts @@ -1,5 +1,5 @@ import * as xliff12ToJs from 'xliff/xliff12ToJs' -import { readFileSync, unlink, writeFile } from 'fs' +import { readFileSync, unlink, writeFile } from 'fs-extra' import { join } from 'path' import { buildFileLocale, I18N_LOCALES, isDefaultLocale } from '../../shared/models/i18n/i18n' import { eachSeries } from 'async' diff --git a/scripts/parse-log.ts b/scripts/parse-log.ts index d22e90266..86aaa7994 100755 --- a/scripts/parse-log.ts +++ b/scripts/parse-log.ts @@ -1,5 +1,5 @@ import * as program from 'commander' -import { createReadStream, readdirSync, statSync } from 'fs' +import { createReadStream, readdirSync, statSync } from 'fs-extra' import { join } from 'path' import { createInterface } from 'readline' import * as winston from 'winston' -- cgit v1.2.3