Require solidity
This module can be used
- a browserify transform when requiring
- to enable node to require sol files
- to compile files ahead of time
For browserify
In your client js simply require solidity files such as
// in client_side.jsvar contractinfo = ;
Then add the module as a transform as normal
var b = ;b;b;b;
For node
; var contractinfo = ;
or you can use it directly
const requireSol = ; var contractinfo = ;
For compiling
$ compile-sol ./path/to/inputfile.sol
Will echo out to the stdout
or you can send it to an output file
$ compile-sol ./path/to/inputfile.sol ./path/to/output.json