Merge pull request #26 from Giveth/transpiled

Transpile js before publishing
This commit is contained in:
Jordi Baylina 2017-11-20 18:54:15 +01:00 committed by GitHub
commit 49bab9e0ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 7 deletions

3
.babelrc Normal file
View File

@ -0,0 +1,3 @@
{
"presets": ["env"]
}

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
lib/
node_modules/
.DS_Store

3
.npmignore Normal file
View File

@ -0,0 +1,3 @@
js
.babelrc
!build

View File

@ -1,5 +1,4 @@
exports.LiquidPledging = require('./js/liquidPledging.js');
exports.LiquidPledgingMock = require('./js/liquidPledgingMock.js');
exports.LiquidPledgingState = require('./js/liquidPledgingState.js');
exports.Vault = require('./js/vault.js');
exports.LiquidPledging = require('./lib/liquidPledging.js');
exports.LiquidPledgingMock = require('./lib/liquidPledgingMock.js');
exports.LiquidPledgingState = require('./lib/liquidPledgingState.js');
exports.Vault = require('./lib/vault.js');

View File

@ -4,11 +4,15 @@
"description": "Liquid Pledging Smart Contract",
"main": "index.js",
"directories": {
"lib": "lib",
"test": "test"
},
"scripts": {
"build": "solcpiler -i './contracts/**/*.sol'",
"test": "npm run build; mocha --harmony"
"test": "npm run build; mocha --harmony",
"sol-compile": "solcpiler -i './contracts/**/*.sol'",
"js-compile": "babel -d lib/ js/",
"build": "npm run sol-compile; npm run js-compile",
"prepublish": "npm run js-compile"
},
"repository": {
"type": "git",
@ -29,7 +33,9 @@
"url": "https://github.com/Giveth/liquidpledging/issues"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-eslint": "^7.2.3",
"babel-preset-env": "^1.6.0",
"eslint-config-airbnb": "^15.0.1",
"eslint-plugin-import": "^2.6.0",
"eslint-plugin-jsx-a11y": "^6.0.2",