Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
remove filecoin
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmurdoch committed Jun 29, 2023
1 parent 78bbafc commit 2f3e076
Show file tree
Hide file tree
Showing 598 changed files with 114 additions and 25,893 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"packages": ["src/packages/*", "src/chains/*/*"],
"packages": ["src/*", "src/ethereum/*"],
"version": "independent",
"command": {
"version": {
Expand Down
26 changes: 4 additions & 22 deletions scripts/create.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TruffleColors } from "../src/packages/colors";
import { TruffleColors } from "../src/colors";
import { sep, join, resolve } from "path";
import { highlight } from "cli-highlight";
import { mkdir, mkdirSync, writeFile } from "fs-extra";
Expand All @@ -22,7 +22,7 @@ const COMMAND_NAME = "create";
const getArgv = () => {
const npmConfigArgv = process.env["npm_config_argv"];
if (npmConfigArgv) {
// handle `npm run create name --location chains`
// handle `npm run create name --location ethereum`
// convert original npm args into a command
// create <name> --location <location> [--folder <folder>]
return JSON.parse(npmConfigArgv).original.slice(1);
Expand All @@ -45,11 +45,7 @@ const COLORS = {
FgRed: "\x1b[31m"
};

let locations = getDirectories(join(__dirname, "../src"));
const chainLocations = getDirectories(join(__dirname, "../src/chains")).map(
d => `chains/${d}`
);
locations = locations.concat(chainLocations);
const locations = ["/", "ethereum"];

const argv = yargs(getArgv())
.command(`${COMMAND_NAME} <name>`, "", yargs => {
Expand Down Expand Up @@ -118,24 +114,10 @@ process.stdout.write(`${COLORS.Reset}`);
// determines how many `../` are needed for package contents
const numDirectoriesAwayFromSrc = 1 + location.split(sep).length;
const relativePathToSrc = "../".repeat(numDirectoriesAwayFromSrc);
const isNewChain = location === "chains";

const workspaceDir = join(__dirname, "../");
const dir = join(workspaceDir, "src", location, folderName);

if (isNewChain) {
mkdirSync(dir);

const fullLocation = join(location, folderName);
console.log(
chalk`{green success} {magenta create} New chain folder {bgBlack ${name} } created at ./src/${fullLocation}.`
);
console.log("");
console.log(
chalk` Add packages to this chain by running: {bgBlack {bold npm run create {dim <}name{dim >} {dim --}location ${fullLocation}}}`
);
return;
}
try {
const LICENSE = readFile(join(workspaceDir, "LICENSE"), "utf-8");

Expand Down Expand Up @@ -352,4 +334,4 @@ describe("${packageName}", () => {
chalk`{red fail} {magenta create} New package {bgBlack ${name} } not created. See error above.`
);
}
})();
})();
15 changes: 0 additions & 15 deletions src/chains/ethereum/console.log/tsconfig.json

This file was deleted.

148 changes: 0 additions & 148 deletions src/chains/filecoin/filecoin/README.md

This file was deleted.

39 changes: 0 additions & 39 deletions src/chains/filecoin/filecoin/index.ts

This file was deleted.

Loading

0 comments on commit 2f3e076

Please sign in to comment.