mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
26 lines
630 B
TypeScript
26 lines
630 B
TypeScript
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 (
|
|
!/.*packages\/babel-(?:helpers|parser|plugin-transform-regenerator)\/?$/.exec(
|
|
dir
|
|
)
|
|
) {
|
|
writeFileSync(path.join(dir, "LICENSE"), LICENSE);
|
|
}
|
|
});
|
|
|
|
shell.ls("-d", "./eslint/*/").forEach(dir => {
|
|
if (!/.*eslint\/babel-eslint-plugin\/?$/.exec(dir)) {
|
|
writeFileSync(path.join(dir, "LICENSE"), LICENSE);
|
|
}
|
|
});
|