diff --git a/scripts/buildFlow.js b/scripts/buildFlow.js deleted file mode 100644 index 06a7772348d..00000000000 --- a/scripts/buildFlow.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the license found in the - * LICENSE file in the root directory of this source tree. - */ - -'use strict'; - -const { readdirSync } = require('node:fs'); -const { join } = require('node:path'); -const { cp } = require('./util'); - -// Non-recursively copy src/*.js to dist/*.js.flow: -for (const entry of readdirSync('src')) { - if (entry.endsWith('.js')) { - const source = join('src', entry); - const destination = join(process.argv[2] || 'dist', `${entry}.flow`); - cp(source, destination); - } -} diff --git a/scripts/util.js b/scripts/util.js deleted file mode 100644 index f66bee9576a..00000000000 --- a/scripts/util.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the license found in the - * LICENSE file in the root directory of this source tree. - * - */ - -'use strict'; - -const { execFileSync } = require('node:child_process'); -const { createReadStream, createWriteStream } = require('node:fs'); - -function cp(source, destination) { - createReadStream(source).pipe(createWriteStream(destination)); -} - -function exec(executable, ...args) { - try { - print(execFileSync(executable, args).toString()); - } catch (err) { - console.error(err); - throw err; - } -} - -function print(string) { - process.stdout.write(string); -} - -module.exports = { cp, exec, print };