add download json script (for now)

pull/7/head
Iuri Matias 7 years ago
parent 1f7b8229a5
commit d0ba2f34d3
  1. 1
      .gitignore
  2. 5
      package.json
  3. 4
      src/compiler.js

1
.gitignore vendored

@ -1,2 +1,3 @@
TODO
node_modules/
soljson.js

@ -4,7 +4,8 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"downloadsolc": "cd node_modules/solc && (test -e soljson.js || wget https://ethereum.github.io/solc-bin/soljson.js) && cd ..",
"prepublish": "npm-run-all -ls downloadsolc"
},
"repository": {
"type": "git",
@ -21,8 +22,10 @@
"colors": "^1.1.2",
"commander": "^2.13.0",
"ethereumjs-vm": "^2.3.2",
"npm-run-all": "^4.1.2",
"remix-lib": "^0.1.2",
"remix-solidity": "../remix/remix-solidity",
"solc": "https://github.com/ethereum/solc-js",
"web3": "^1.0.0-beta.27"
}
}

@ -8,8 +8,6 @@ let RemixCompiler = require('remix-solidity').Compiler;
// TODO: replace this with remix's own compiler code
function compileFile(filename, cb) {
console.log("compile all");
let compiler;
const sources = {
"tests.sol": {content: fs.readFileSync("sol/tests.sol").toString()},
@ -24,7 +22,6 @@ function compileFile(filename, cb) {
async.waterfall([
function loadCompiler(next) {
console.log("loadCompiler");
compiler = new RemixCompiler();
compiler.onInternalCompilerLoaded();
//compiler.event.register('compilerLoaded', this, function (version) {
@ -35,7 +32,6 @@ function compileFile(filename, cb) {
compiler.event.register('compilationFinished', this, function (success, data, source) {
next(null, data);
});
console.log("doCompilation");
compiler.compile(sources, "examples/");
}
], function(err, result) {

Loading…
Cancel
Save