mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* remove * fix * Remove from standalone --------- Co-authored-by: Nicolò Ribaudo <[email protected]>
28 lines
646 B
JavaScript
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);
|
|
}
|
|
});
|