Skip to content

Commit 5f067bf

Browse files
authored
Merge pull request #324 from JirkaChadima/chore/npmpublishviatravis
Allows publishing to NPM automatically from travis
2 parents a3193ab + 05146d9 commit 5f067bf

File tree

5 files changed

+985
-726
lines changed

5 files changed

+985
-726
lines changed

.npmignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
node_modules
2+
npm-debug.log
3+
.node-xmlhttprequest-sync-[0-9]*
4+
coverage
5+
coverage.json
6+
allFiredEvents
7+
scTopics
8+
package-lock.json
9+
contracts
10+
!build/contracts
11+
migrations
12+
scripts
13+
test
14+
.solcover.js
15+
.eslintrc.js
16+
.travis.yml
17+
truffle-config.js

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,14 @@ matrix:
1515
- env: SOLIDITY_COVERAGE=true
1616
script:
1717
- ./scripts/ci.sh
18+
before_deploy: npm run buildfornpm
19+
deploy:
20+
provider: npm
21+
22+
skip_cleanup: true
23+
api_key: $NPM_TOKEN
24+
on:
25+
branch: master
26+
tags: true
27+
28+

index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const LifChannelsContract = require('./build/contracts/LifChannels.json');
2+
const LifCrowdsaleContract = require('./build/contracts/LifCrowdsale.json');
3+
const LifMarketValidationMechanismContract = require('./build/contracts/LifMarketValidationMechanism.json');
4+
const LifTokenContract = require('./build/contracts/LifToken.json');
5+
const VestedPaymentContract = require('./build/contracts/VestedPayment.json');
6+
7+
module.exports = {
8+
LifChannelsContract: LifChannelsContract,
9+
LifCrowdsaleContract: LifCrowdsaleContract,
10+
LifMarketValidationMechanismContract: LifMarketValidationMechanismContract,
11+
LifTokenContract: LifTokenContract,
12+
VestedPaymentContract: VestedPaymentContract,
13+
}

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
2-
"name": "lif-token",
2+
"name": "@windingtree/lif-token",
33
"version": "0.1.0",
44
"description": "Winding Tree Platform Token",
55
"main": "index.js",
66
"scripts": {
77
"test": "scripts/test.sh",
88
"coverage": "scripts/coverage.sh",
99
"coveralls": "scripts/coveralls.sh",
10-
"lint": "eslint test"
10+
"lint": "eslint test",
11+
"clean": "rimraf build",
12+
"buildfornpm": "npm run clean && truffle compile"
1113
},
1214
"repository": {
1315
"type": "git",
@@ -26,6 +28,7 @@
2628
"ethereumjs-abi": "^0.6.4",
2729
"jsverify": "^0.8.2",
2830
"lodash": "^4.17.4",
31+
"rimraf": "^2.6.2",
2932
"truffle-hdwallet-provider": "0.0.3",
3033
"zeppelin-solidity": "^1.6.0"
3134
},

0 commit comments

Comments
 (0)