npm.io
0.0.2-alpha.0 • Published 7 years ago

truffle-conflux-workflow-compile

Licence
MIT
Version
0.0.2-alpha.0
Deps
9
Size
16 kB
Vulns
0
Weekly
0
Stars
13.9K

truffle-conflux-workflow-compile

Core workflow logic for the truffle compile command behavior

install

$ npm install truffle-conflux-workflow-compile

Usage

const Contracts = require("truffle-conflux-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))