Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Add release build, rewrite tests to read from dist #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

{
"presets": ["env"]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,5 @@ typings/
.idea

./protocol

dist
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ before_install:
install:
- npm install
script:
- npm run build
- npm test

cache:
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"test": "mocha",
"protoc:install": "cd protocol && ./install-protobuf.sh",
"protoc:generate": "./protocol/protobuf-3.5.1/src/.libs/protoc --proto_path=protocol/protobuf-3.5.1/src --proto_path=protocol --grpc_out=./src/protocol --plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` --js_out=import_style=commonjs,binary:src/protocol protocol/core/*.proto protocol/api/*.proto",
"test:watch": "mocha --watch"
"test:watch": "mocha --watch",
"build": "babel ./src --experimental --source-maps-inline -d ./dist"
},
"repository": {
"type": "git",
Expand All @@ -21,6 +22,7 @@
"license": "GPL-3.0",
"dependencies": {
"axios": "^0.18.0",
"babel-polyfill": "^6.26.0",
"chai": "^4.1.2",
"crypto-js": "^3.1.9-1",
"elliptic": "^6.4.0",
Expand All @@ -31,5 +33,9 @@
"js-sha3": "^0.7.0",
"mocha": "^5.1.0",
"qs": "^6.5.1"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.7.0"
}
}
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require('babel-polyfill');
const GrpcClient = require("./client/grpc");
const HttpClient = require("./client/http");

Expand Down
2 changes: 1 addition & 1 deletion test/address.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { assert } = require('chai');
const {isAddressValid} = require("../src/utils/address");
const {isAddressValid} = require("../dist/utils/address");

describe('address', () => {

Expand Down
4 changes: 2 additions & 2 deletions test/client.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const {bytesToString} = require("../src/utils/bytes");
const {GrpcClient} = require("../src");
const {bytesToString} = require("../dist/utils/bytes");
const {GrpcClient} = require("../dist");
const assert = require("assert");


Expand Down
2 changes: 1 addition & 1 deletion test/httpclient.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const {HttpClient} = require("../src");
const {HttpClient} = require("../dist");
const assert = require("assert");

describe('http client', () => {
Expand Down
Loading