| 62 | |
| 63 | //initialize the yul-log environment |
| 64 | function yulLogInit() { |
| 65 | //clone the truffle yulp box repo and copy the contents into the root directory |
| 66 | exec( |
| 67 | "git clone https://github.com/ControlCplusControlV/Truffle-Yulp-Box.git\ |
| 68 | && cd Truffle-Yulp-Box\ |
| 69 | && cp -r ./* ../\ |
| 70 | && cd ../\ |
| 71 | && rm -rf Truffle-Yulp-Box", |
| 72 | function (error, stdout, stderr) { |
| 73 | if (error !== null) { |
| 74 | console.log("exec error: " + error); |
| 75 | } |
| 76 | } |
| 77 | ); |
| 78 | |
| 79 | //compile the test contract |
| 80 | console.log("Compiling example contract..."); |
| 81 | exec("yul-log truffle", function (error, stdout, stderr) { |
| 82 | if (error !== null) { |
| 83 | console.log("exec error: " + error); |
| 84 | } |
| 85 | |
| 86 | console.log( |
| 87 | 'Yul-Log is all set up! You can run "truffle test" to see the example tests in action.' |
| 88 | ); |
| 89 | }); |
| 90 | } |
| 91 | |
| 92 | //function to make exec promise |
| 93 | function execPromise(cmd) { |