Merge pull request #58 from ethereum/vyperPackaging

Vyper compiler
pull/3094/head
yann300 6 years ago committed by GitHub
commit 5082ad3e36
  1. 1
      .gitignore
  2. 7
      bin/remixd
  3. 11
      package.json
  4. 35
      src/services/vyper.js

1
.gitignore vendored

@ -1,2 +1,3 @@
node_modules
npm-debug.log
python_modules

@ -4,6 +4,7 @@ var servicesList = require('../src/servicesList')
var program = require('commander')
var startmistGeth = require('../src/services/startMistGeth')
var startFrontend = require('../src/services/startFrontend')
var vyper = require('../src/services/vyper')
var fs = require('fs-extra')
program
@ -12,6 +13,7 @@ program
.option('--remix-ide <url>', 'URL of remix instance allowed to connect to this web sockect connection')
.option('-s, --shared-folder <path>', 'Folder to share with Remix IDE')
.option('--read-only', 'Treat shared folder as read-only (experimental)')
.option('--vyper', 'Run a local vyper compiler')
.option('-m, --mist', 'start mist')
.option('-g, --geth', 'start geth')
.option('-p, --dev-path <dev-path>', 'Folder used by mist/geth to start the development instance')
@ -27,6 +29,11 @@ program
var killCallBack = []
if (program.vyper) {
console.log('starting vyper compiler')
vyper()
}
if (!program.remixIde) {
return console.log('\x1b[31m%s\x1b[0m', '[ERR] URL Remix IDE instance has to be provided.')
}

@ -8,7 +8,9 @@
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "./bin/remixd"
"start": "./bin/remixd",
"npip": "npip",
"install": "npip install"
},
"repository": {
"type": "git",
@ -32,10 +34,17 @@
"fs-extra": "^3.0.1",
"isbinaryfile": "^3.0.2",
"lerna": "^2.9.0",
"nopy": "^0.2.6",
"serve": "7.0.0",
"stdout": "0.0.3",
"watch": "^1.0.2",
"web3": "1.0.0-beta.27",
"websocket": "^1.0.24"
},
"python": {
"execPath": "python3",
"dependencies": {
"vyper": ">=0.1.0b3"
}
}
}

@ -0,0 +1,35 @@
var exec = require('child_process').exec
var stdout = require('stdout')
module.exports = function () {
var vyperServer = run('./node_modules/.bin/nopenv vyper-serve', [])
function kill () {
if (vyperServer) {
console.log('stopping vyper compiler')
vyperServer.kill()
}
}
return kill
}
function run (app, args) {
var proc
try {
proc = exec(app, args)
proc.on('error', (err) => {
console.log('\x1b[31m%s\x1b[0m', '[ERR] can\'t start ' + app + '. seems not installed')
console.log(err)
})
proc.on('exit', function (code, signal) {
console.log('child process exited with ' +
`code ${code} and signal ${signal}`)
})
proc.on('message', function (msg) {
console.log(`from ${app} : ${msg}`)
})
proc.stdout.pipe(stdout())
} catch (e) {
console.log(e)
}
return proc
}
Loading…
Cancel
Save