Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed Jun 20, 2022
1 parent e393b4e commit 91a04c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile.mjs
@@ -1,5 +1,5 @@
import "shelljs/make.js";
import { default as path } from "path";
import path from "path";
import { execFileSync } from "child_process";
import { writeFileSync } from "fs";

Expand Down
12 changes: 9 additions & 3 deletions scripts/clone-license.js
@@ -1,19 +1,25 @@
import { default as shell } from "shelljs";
import { readFileSync, writeFileSync } from "fs";
import shell from "shelljs";
import path from "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-parser|babel-plugin-transform-object-assign)\/?$/
)
) {
shell.cp("LICENSE", dir);
writeFileSync(path.join(dir, "LICENSE"), LICENSE);
}
});

shell.ls("-d", "./eslint/*/").forEach(dir => {
if (!dir.match(/.*eslint\/(babel-eslint-plugin)\/?$/)) {
shell.cp("LICENSE", dir);
writeFileSync(path.join(dir, "LICENSE"), LICENSE);
}
});

0 comments on commit 91a04c1

Please sign in to comment.