locklift
Version:
Node JS framework for working with Ever contracts. Inspired by Truffle and Hardhat. Helps you to build, test, run and maintain your smart contracts.
17 lines (15 loc) • 568 B
text/typescript
import path from "path";
import yargs from "yargs";
import { hideBin } from "yargs/helpers";
const DEFAULT_CONFIG_PATH = "locklift.config.ts";
export const tryToAttachEntryFile = (): void => {
const { config } = yargs(hideBin(process.argv)).argv as { config?: string };
const pathToEntryFile = path.resolve(process.cwd(), config || DEFAULT_CONFIG_PATH);
try {
// eslint-disable-next-line @typescript-eslint/no-require-imports
require(pathToEntryFile);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
return;
}
};