UNPKG

hardhat

Version:

Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.

63 lines 1.78 kB
import { ArgumentType } from "../../../types/arguments.js"; import { globalOption, task } from "../../core/config.js"; import "./type-extensions.js"; const buildTask = task("build", "Build project") .addFlag({ name: "force", description: "Force compilation even if no files have changed", }) .addFlag({ name: "quiet", description: "Make the compilation process less verbose", }) .addOption({ name: "defaultBuildProfile", description: "The default build profile to use", defaultValue: "default", }) .addVariadicArgument({ name: "files", description: "An optional list of files to compile", defaultValue: [], }) .addFlag({ name: "noTests", description: "Skip solidity tests compilation", }) .addFlag({ name: "noContracts", description: "Skip solidity contracts compilation", }) .setAction(async () => import("./tasks/build.js")) .build(); const hardhatPlugin = { id: "builtin:solidity", dependencies: () => [import("../artifacts/index.js")], hookHandlers: { config: () => import("./hook-handlers/config.js"), hre: () => import("./hook-handlers/hre.js"), }, tasks: [ { ...buildTask, id: ["build"], description: "Build project", }, { ...buildTask, id: ["compile"], description: "Build project (alias for build)", }, ], globalOptions: [ globalOption({ name: "buildProfile", description: "The build profile to use", type: ArgumentType.STRING_WITHOUT_DEFAULT, defaultValue: undefined, }), ], npmPackage: "hardhat", }; export default hardhatPlugin; //# sourceMappingURL=index.js.map