Files
babel/scripts/clone-license.js
T
f7886273a8 [Babel 8] Remove @babel/plugin-transform-object-assign (#17619)
* remove

* fix

* Remove from standalone

---------

Co-authored-by: Nicolò Ribaudo <[email protected]>
2026-01-16 22:27:25 +01:00

28 lines
646 B
JavaScript

// @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-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);
}
});