Skip to content

Commit fec951f

Browse files
committed
chore: Makes building for npm possible by adding .npmignore, buildfornpm script #318
1 parent 1b50f53 commit fec951f

File tree

4 files changed

+973
-725
lines changed

4 files changed

+973
-725
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

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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
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)