Skip to content

Commit

Permalink
[FABN-909] publish empty common module
Browse files Browse the repository at this point in the history
- add new common package
- link as dependancy
- publish empty package

Change-Id: Ib7bd444fe273b15949743441b7f67108bf5c9975
Signed-off-by: [email protected] <[email protected]>
  • Loading branch information
nklincoln committed Oct 3, 2018
1 parent ed043c3 commit 526a266
Show file tree
Hide file tree
Showing 9 changed files with 140 additions and 23 deletions.
52 changes: 33 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,37 @@
# Copyright IBM Corp. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

#general
coverage
docs/gen
node_modules/*
package-lock.json
npm-shrinkwrap.json
npm-debug.log
yarn.lock
tmp
.project
.DS_Store
.vscode
.idea
.nyc_output/*
*.csv
*.heapsnapshot

#test files
test/typescript/**/*.js
test/typescript/**/*.js.map
test/fixtures/src/node_cc/example_cc/.npmrc
test/fixtures/src/node_cc/example_cc1/.npmrc
test/fixtures/src/github.com/example_cc/junk.go

#fabric client
fabric-client/.DS_Store
fabric-client/node_modules/*
fabric-client/.nyc_output

#fabric-ca-client
fabric-ca-client/.DS_Store
fabric-ca-client/node_modules/*
fabric-ca-client/.nyc_output
fabric-ca-client/lib/api.js
Expand All @@ -20,27 +46,15 @@ fabric-ca-client/lib/hash.js
fabric-ca-client/lib/impl/*
fabric-ca-client/types/base.d.ts
fabric-ca-client/types/tsconfig.json

#fabric network items
fabric-network/.DS_Store
fabric-network/node_modules/*
fabric-network/.nyc_output
npm-shrinkwrap.json
npm-debug.log
tmp
.project
.DS_Store
fabric-client/.DS_Store
fabric-ca-client/.DS_Store
fabric-network/.DS_Store
test/fixtures/src/github.com/example_cc/junk.go
*.csv
*.heapsnapshot
.vscode
.idea
.nyc_output/*
test/typescript/**/*.js
test/typescript/**/*.js.map
yarn.lock
test/fixtures/src/node_cc/example_cc/.npmrc
test/fixtures/src/node_cc/example_cc1/.npmrc
fabric-network/_*
fabric-network/e2e
fabric-network/OUTSTA*

#fabric common items
fabric-common/node_modules/*
fabric-common/.nyc_output
15 changes: 15 additions & 0 deletions fabric-common/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright IBM Corp. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

# OS generated files #
.DS_Store

# Node Files #
/node_modules
npm-debug.log

# Coverage #
/coverage

# Test Files #
/test
10 changes: 10 additions & 0 deletions fabric-common/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Hyperledger Fabric Common for Node.js

SDK for writing node.js applications to interact with [Hyperledger Fabric](http://hyperledger-fabric.readthedocs.io/en/latest/).

This package encapsulates the common code used by the `fabric-ca-client`, `fabric-client` packages.

For application developer documentations, please visit [https://fabric-sdk-node.github.io/](https://fabric-sdk-node.github.io/)

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.

5 changes: 5 additions & 0 deletions fabric-common/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/**
* Copyright 2018 IBM All Rights Reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
5 changes: 5 additions & 0 deletions fabric-common/lib/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/**
* Copyright 2018 IBM All Rights Reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
54 changes: 54 additions & 0 deletions fabric-common/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "fabric-commmon",
"version": "1.3.0-snapshot",
"description" : "This package encapsulates the common code used by the `fabric-ca-client`, `fabric-client` packages.",
"keywords" :[
"blockchain",
"hyperledger"
],
"main": "index.js",
"repository": {
"type": "gerrit",
"url": "https://gerrit.hyperledger.org/r/#/admin/projects/fabric-sdk-node"
},
"homepage": "https://www.hyperledger.org/projects/fabric",
"author": {
"name": "hyperledger/fabric",
"email": "[email protected]"
},
"scripts": {
"test": "nyc mocha --recursive -t 10000"
},
"dependencies": {
},
"devDependencies": {
"mocha": "^5.2.0",
"nyc": "^12.0.2",
"rewire": "^4.0.1",
"sinon": "^5.0.7"
},
"nyc": {
"exclude": [
"coverage/**",
"test/**"
],
"reporter": [
"text-summary",
"html"
],
"cache": true,
"all": true,
"check-coverage": true,
"statements": 100,
"branches": 100,
"functions": 100,
"lines": 100
},
"license": "Apache-2.0",
"licenses": [
{
"type": "Apache-2.0",
"url": "https://github.com/hyperledger/fabric/blob/master/LICENSE"
}
]
}
5 changes: 5 additions & 0 deletions fabric-common/test/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/**
* Copyright 2018 IBM All Rights Reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"elliptic": "^6.3.2",
"eslint": "^5.1.0",
"fabric-ca-client": "file:./fabric-ca-client",
"fabric-client": "file:./fabric-client",
"fabric-client": "file:./fabric-client",
"fabric-common": "file:./fabric-common",
"fabric-network": "file:./fabric-network",
"fs-extra": "^6.0.1",
"gulp": "^3.9.1",
Expand Down Expand Up @@ -65,12 +66,13 @@
},
"nyc": {
"include": [
"fabric-network/lib/**/*.js",
"fabric-client/lib/**/*.js",
"fabric-ca-client/lib/FabricCAClientImpl.js",
"fabric-ca-client/lib/helper.js",
"fabric-ca-client/lib/IdentityService.js",
"fabric-ca-client/lib/AffiliationService.js"
"fabric-ca-client/lib/AffiliationService.js",
"fabric-client/lib/**/*.js",
"fabric-common/lib/**/*.js",
"fabric-network/lib/**/*.js"
],
"reporter": [
"lcov",
Expand Down
7 changes: 7 additions & 0 deletions scripts/Jenkins_Scripts/Publish_NPM_Modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,10 @@ if [ -d "../fabric-network" ]; then
versions
npmPublish fabric-network
fi

# publish fabric-common node module
if [ -d "../fabric-common" ]; then
cd ../fabric-common
versions
npmPublish fabric-common
fi

0 comments on commit 526a266

Please sign in to comment.