@truffle/workflow-compile

v4.0.71
Core workflow behavior for `truffle compile` command

@truffle/workflow-compile

Core workflow logic for the truffle compile command behavior

install

$ npm install @truffle/workflow-compile

Usage

import Contracts from "@truffle/workflow-compile";

// expected config object
const config = {
  contracts_directory: "/users/myPath/to/contracts", // dir where contracts are located
  contracts_build_directory: "/users/myPath/to/buildDir" // dir where contract artifacts will be saved
};

// compiles contracts found in contracts_directory,
// saves them in contracts_build_directory
Contracts.compile(config)
  .then(() => console.log("Compilation complete!"))
  .catch(e => console.error(e));
npm i @truffle/workflow-compile

Metadata

  • MIT
  • ^16.20 || ^18.16 || >=20
  • Truffle Suite
  • released 9/13/2023

Downloads