1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2024-11-22 01:36:56 +01:00

Diversify node and browser builds

This commit is contained in:
vrde 2017-06-16 14:21:33 +02:00
parent a5efa38121
commit 0200ffb2fb
No known key found for this signature in database
GPG Key ID: 6581C7C39B3D397D
2 changed files with 22 additions and 20 deletions

View File

@ -1,6 +1,6 @@
{
"name": "bigchaindb-driver",
"version": "1.0.2",
"version": "0.1.0",
"description": "Node.js driver for BigchainDB",
"homepage": "https://www.bigchaindb.com/",
"bugs": "https://github.com/bigchaindb/js-bigchaindb-driver/issues",
@ -11,9 +11,10 @@
"license": "Apache-2.0",
"author": "BigchainDB",
"main": "./dist/node/index.js",
"browser": "./dist/browser/bundle.min.js",
"scripts": {
"lint": "eslint ./",
"build": "npm run clean && npm run build:bundle && npm run build:cjs && npm run build:dist",
"build": "npm run clean && npm run build:cjs && npm run build:dist",
"build:bundle": "webpack",
"build:cjs": "cross-env BABEL_ENV=cjs babel ./src -d dist/node",
"build:dist": "cross-env NODE_ENV=production webpack -p",
@ -22,7 +23,7 @@
"release": "./node_modules/release-it/bin/release.js --src.tagName='v%s' --github.release --npm.publish --non-interactive",
"release-minor": "./node_modules/release-it/bin/release.js minor --src.tagName='v%s' --github.release --npm.publish --non-interactive",
"release-major": "./node_modules/release-it/bin/release.js major --src.tagName='v%s' --github.release --npm.publish --non-interactive",
"prepublishOnly": "npm update && npm run build",
"prepublish": "npm update && npm run build",
"precommit": "npm run lint"
},
"devDependencies": {
@ -49,6 +50,7 @@
"webpack": "^2.2.1"
},
"dependencies": {
"browser-resolve": "^1.11.2",
"bs58": "^4.0.0",
"buffer": "^5.0.2",
"clone": "^2.1.0",
@ -73,21 +75,21 @@
"dapp"
],
"ava": {
"files": [
"test/*.js"
],
"source": [
"**/*.{js,jsx}",
"!node_modules/**/*",
"!dist/**/*"
],
"failFast": true,
"failWithoutAssertions": false,
"tap": true,
"powerAssert": false,
"require": [
"babel-register"
],
"babel": "inherit"
"files": [
"test/*.js"
],
"source": [
"**/*.{js,jsx}",
"!node_modules/**/*",
"!dist/**/*"
],
"failFast": true,
"failWithoutAssertions": false,
"tap": true,
"powerAssert": false,
"require": [
"babel-register"
],
"babel": "inherit"
}
}

View File

@ -10,7 +10,7 @@ const PRODUCTION = process.env.NODE_ENV === 'production'
const PATHS = {
ENTRY: path.resolve(__dirname, './src/index.js'),
BUNDLE: path.resolve(__dirname, 'dist/bundle'),
BUNDLE: path.resolve(__dirname, 'dist/browser'),
NODE_MODULES: path.resolve(__dirname, 'node_modules'),
}