Go Ethereum 以太坊 web3.js 打包编译发布过程

太坊的js交互是靠web3.js调用的。
改完后,需要打包,放到Go Ethereum里测试,以下就是打包编译过程说明。
web3.js版本:v0.20.6。

  1. 安装cnpm
1
npm install -g cnpm --registry=https://registry.npm.taobao.org
  1. web3.js的根路径下 安装web3.js的依赖
1
$ cnpm install
  1. 安装gulp打包命令
1
npm install gulp -g
  1. web3.js的根路径下 执行gulp
1
gulp
  1. dist/web3.js文件拷贝到项目中
1
cp dist/web3.js ../go-cypherium/internal/jsre/deps
  1. 安装go-bindata(我是在~目录下执行的)
1
go get -u github.com/jteeuwen/go-bindata/...
  1. 复制 go-bindata文件 到 go的安装目录的bin下。
1
cp ~/go/bin/go-bindata  ~/install/go/bin
  1. 在cypherium_private/go-cypherium/internal/jsre/deps下执行deps.go的倒数第二行,会看到bindata.go已变蓝色,大功告成!
1
go-bindata -nometadata -pkg deps -o bindata.go bignumber.js web3.js
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值