Skip to content

Commit

Permalink
Ejecting the HH project
Browse files Browse the repository at this point in the history
  • Loading branch information
nvitorovic committed Jul 26, 2022
1 parent 31d488c commit 62fd8c9
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions lib/eject.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const fs = require("fs");

const ignore = `.idea
artifacts
cache
lib
node_modules
typechain-types
.env
ejected
`;

const dest = "../ejected";
if (fs.existsSync(dest)) {
fs.rmSync(dest, { recursive: true });
}
fs.mkdirSync(dest);

const ROOT = "../";

const notIgnored = (file) => ignore.indexOf(file) == -1;

fs.readdirSync(ROOT)
.filter(notIgnored)
.forEach((file) => {
fs.cpSync(`${ROOT}/${file}`, `${dest}/${file}`, { recursive: true });
});

0 comments on commit 62fd8c9

Please sign in to comment.