sol-straightener
Straighten/Flatten Solidity file from js file
Last updated a year ago by aniket-engg .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install sol-straightener 
SYNC missed versions from official npm registry.

npm version Build status Coverage Status dependencies Status devDependencies Status npm GitHub

sol-straightener

sol-straightener is an NPM package to straighten the Solidity smart contracts for various purposes. It fetches the content of each imported file and returns the straightened version. It works inside a file.

Install

npm install --save sol-straightener

How to use

    const Straightener = require('sol-straightener');
    let result = await Straightener.straighten(<solidity/file/path>);

An import straightened file contents will be returned which can be used for further processing or writing a file.

Support

Currently it handles import of files from:

  • relative directories, e.g; import "./lib/SafeMath.sol";
  • All parent node_modules directories, e.g; import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
  • Github, e.g; import "github.com/oraclize/ethereum-api/oraclizeAPI_0.5.sol";

Contribution

contributions welcome

Contribution in any form is most welcome.

License

MIT

Current Tags

  • 1.1.1                                ...           latest (a year ago)

3 Versions

  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (2)
Dev Dependencies (6)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |