1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2024-11-22 17:50:09 +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", "name": "bigchaindb-driver",
"version": "1.0.2", "version": "0.1.0",
"description": "Node.js driver for BigchainDB", "description": "Node.js driver for BigchainDB",
"homepage": "https://www.bigchaindb.com/", "homepage": "https://www.bigchaindb.com/",
"bugs": "https://github.com/bigchaindb/js-bigchaindb-driver/issues", "bugs": "https://github.com/bigchaindb/js-bigchaindb-driver/issues",
@ -11,9 +11,10 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"author": "BigchainDB", "author": "BigchainDB",
"main": "./dist/node/index.js", "main": "./dist/node/index.js",
"browser": "./dist/browser/bundle.min.js",
"scripts": { "scripts": {
"lint": "eslint ./", "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:bundle": "webpack",
"build:cjs": "cross-env BABEL_ENV=cjs babel ./src -d dist/node", "build:cjs": "cross-env BABEL_ENV=cjs babel ./src -d dist/node",
"build:dist": "cross-env NODE_ENV=production webpack -p", "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": "./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-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", "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" "precommit": "npm run lint"
}, },
"devDependencies": { "devDependencies": {
@ -49,6 +50,7 @@
"webpack": "^2.2.1" "webpack": "^2.2.1"
}, },
"dependencies": { "dependencies": {
"browser-resolve": "^1.11.2",
"bs58": "^4.0.0", "bs58": "^4.0.0",
"buffer": "^5.0.2", "buffer": "^5.0.2",
"clone": "^2.1.0", "clone": "^2.1.0",

View File

@ -10,7 +10,7 @@ const PRODUCTION = process.env.NODE_ENV === 'production'
const PATHS = { const PATHS = {
ENTRY: path.resolve(__dirname, './src/index.js'), 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'), NODE_MODULES: path.resolve(__dirname, 'node_modules'),
} }