/
githubmirror
/
babel
Обзор
Документация
Войти
/
githubmirror
/
babel
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v7.29.6
scripts/clone-license.js
27 строк
677 B
Huáng Jùnliàng
Enable type checking for `scripts` and `babel-worker.cjs` (#17454)
30 июл 2025, 01:26
Не верифицирован
30 июл 2025, 01:26
ac0b069
Код
Авторство
О чём код?
// @ts-check import { readFileSync, writeFileSync } from "node:fs"; import shell from "shelljs"; import path from "node:path"; console.log("Cloning LICENSE to babel packages"); const LICENSE = readFileSync("LICENSE", "utf8"); console.log(LICENSE); shell.ls("-d", "./packages/*/").forEach(dir => { if ( !dir.match( /.*packages\/babel-(helpers|parser|plugin-transform-object-assign|plugin-transform-regenerator)\/?$/ ) ) { writeFileSync(path.join(dir, "LICENSE"), LICENSE); } }); shell.ls("-d", "./eslint/*/").forEach(dir => { if (!dir.match(/.*eslint\/(babel-eslint-plugin)\/?$/)) { writeFileSync(path.join(dir, "LICENSE"), LICENSE); } });