/
githubmirror
/
babel
Обзор
Документация
Войти
/
githubmirror
/
babel
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v7.28.2
scripts/clone-license.js
25 строк
663 B
Huáng Jùnliàng
Enforce node protocol import (#17207)
31 мар 2025, 17:49
Не верифицирован
31 мар 2025, 17:49
317e332
Код
Авторство
О чём код?
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); } });