Commit d0ba2f34 authored by Iuri Matias's avatar Iuri Matias

add download json script (for now)

parent 1f7b8229
TODO TODO
node_modules/ node_modules/
soljson.js
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "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": { "repository": {
"type": "git", "type": "git",
...@@ -21,8 +22,10 @@ ...@@ -21,8 +22,10 @@
"colors": "^1.1.2", "colors": "^1.1.2",
"commander": "^2.13.0", "commander": "^2.13.0",
"ethereumjs-vm": "^2.3.2", "ethereumjs-vm": "^2.3.2",
"npm-run-all": "^4.1.2",
"remix-lib": "^0.1.2", "remix-lib": "^0.1.2",
"remix-solidity": "../remix/remix-solidity", "remix-solidity": "../remix/remix-solidity",
"solc": "https://github.com/ethereum/solc-js",
"web3": "^1.0.0-beta.27" "web3": "^1.0.0-beta.27"
} }
} }
...@@ -8,8 +8,6 @@ let RemixCompiler = require('remix-solidity').Compiler; ...@@ -8,8 +8,6 @@ let RemixCompiler = require('remix-solidity').Compiler;
// TODO: replace this with remix's own compiler code // TODO: replace this with remix's own compiler code
function compileFile(filename, cb) { function compileFile(filename, cb) {
console.log("compile all");
let compiler; let compiler;
const sources = { const sources = {
"tests.sol": {content: fs.readFileSync("sol/tests.sol").toString()}, "tests.sol": {content: fs.readFileSync("sol/tests.sol").toString()},
...@@ -24,7 +22,6 @@ function compileFile(filename, cb) { ...@@ -24,7 +22,6 @@ function compileFile(filename, cb) {
async.waterfall([ async.waterfall([
function loadCompiler(next) { function loadCompiler(next) {
console.log("loadCompiler");
compiler = new RemixCompiler(); compiler = new RemixCompiler();
compiler.onInternalCompilerLoaded(); compiler.onInternalCompilerLoaded();
//compiler.event.register('compilerLoaded', this, function (version) { //compiler.event.register('compilerLoaded', this, function (version) {
...@@ -35,7 +32,6 @@ function compileFile(filename, cb) { ...@@ -35,7 +32,6 @@ function compileFile(filename, cb) {
compiler.event.register('compilationFinished', this, function (success, data, source) { compiler.event.register('compilationFinished', this, function (success, data, source) {
next(null, data); next(null, data);
}); });
console.log("doCompilation");
compiler.compile(sources, "examples/"); compiler.compile(sources, "examples/");
} }
], function(err, result) { ], function(err, result) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment