Skip to content

Commit

Permalink
Merge pull request #137 from tanganellilore/nodejs-support
Browse files Browse the repository at this point in the history
Nodejs ES2015 integration with babel and  Bundled Package
  • Loading branch information
durera authored Dec 23, 2019
2 parents 2a43371 + 2bf02bd commit df392f0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
3 changes: 1 addition & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

{
"presets": [ "@babel/preset-env" ],
"plugins": ["istanbul"]
"presets": [ "@babel/preset-env" ]
}
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@wiotp/sdk",
"version": "0.6.0",
"version": "0.6.1",
"description": "SDK for developing device, gateway, and application clients for IBM Watson IoT Platform",
"main": "index.js",
"main": "dist/index.js",
"files": [
"src",
"index.js",
Expand All @@ -16,6 +16,7 @@
"dependencies": {
"axios": "^0.19.0",
"bluebird": "^3.5.4",
"browserify": "^16.5.0",
"btoa": "^1.2.1",
"concat-stream": "^2.0.0",
"events": "^3.0.0",
Expand All @@ -35,18 +36,22 @@
"@cloudant/cloudant": "^2.1.0",
"@istanbuljs/nyc-config-babel": "^2.1.1",
"babel-plugin-istanbul": "^5.1.4",
"browserify": "16.5.0",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"coveralls": "3.0.3",
"mocha": "6.1.4",
"mocha-steps": "^1.3.0",
"nyc": "14.1.1",
"rimraf": "2.6.3"
"rimraf": "2.6.3",
"terser": "^4.4.3"
},
"scripts": {
"clean": "rimraf dist/*",
"build:commonjs": "babel src --out-dir dist --modules umd",
"build": "npm run clean && npm run build:commonjs",
"build": "npm run clean && npm run build:commonjs && npm run build:bundle && npm run build:min",
"build:commonjs": "babel src --out-dir dist",
"build:bundle": "browserify dist/index.js --outfile dist/bundled/wiotp-bundle.js",
"build:min": "terser dist/bundled/wiotp-bundle.js -o dist/bundled/wiotp-bundle.min.js",
"test": "mocha --require @babel/register --require mocha-steps",
"test-cov": "nyc --reporter=lcov --reporter=text-summary mocha --require mocha-steps",
"test:watch": "mocha --require @babel/register --require mocha-steps --watch"
Expand Down
12 changes: 6 additions & 6 deletions index.js → src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
*
*/

export { default as ApplicationClient } from './src/application/ApplicationClient';
export { default as DeviceClient } from './src/device/DeviceClient';
export { default as GatewayClient } from './src/gateway/GatewayClient';
export { default as ApplicationClient } from './application/ApplicationClient';
export { default as DeviceClient } from './device/DeviceClient';
export { default as GatewayClient } from './gateway/GatewayClient';

export { default as ApplicationConfig } from './src/application/ApplicationConfig';
export { default as DeviceConfig } from './src/device/DeviceConfig';
export { default as ApplicationConfig } from './application/ApplicationConfig';
export { default as DeviceConfig } from './device/DeviceConfig';

export {default as ApiErrors} from './src/api/ApiErrors';
export {default as ApiErrors} from './api/ApiErrors';

0 comments on commit df392f0

Please sign in to comment.