Skip to content

Commit

Permalink
fix: update install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
JGiter committed Dec 18, 2020
1 parent 7671169 commit 2d59de6
Showing 1 changed file with 35 additions and 27 deletions.
62 changes: 35 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,50 @@
# Identity and Access Management (IAM) Client Library

TypeScript library to be used within decentralized applications for authentication and authorization using DIDs (Decentralized Identifiers) and VCs (Verifiable Credentials)

##

![IAM-client-lib demos](screenshots/react-angular-vue_demos.png)

## Live Demos

[![react logo](examples/react-dapp/src/assets/react-icon.png) React Demo](https://did-auth-demo.energyweb.org/react-example/) / [![angular logo](examples/angular-dapp/src/assets/angular-icon.png) Angular Demo](https://did-auth-demo.energyweb.org/angular-example/) / [![vue logo](examples/vue-dapp/src/assets/vue-icon.png) Vue Demo](https://did-auth-demo.energyweb.org/vue-example/)

## Documentation

[Read the Docs](https://energy-web-foundation-iam-client-lib.readthedocs-hosted.com/_/sharing/ojw5kxd0al7k1llbcp78i6oiv)

## Getting Started

For development purposes, please follow below steps to integrate the library with your dApps.

### Prerequisites

`iam-client-lib` is written in TypeScript. Make sure to have Node.js (>= v10) installed.
Create a folder named ***iam-client-lib*** and clone this GIT project.

### Installing Dependencies
Using `npm` to install dependencies:
```sh
$ npm install
```

### Compile & Build
To generate bundled JS files and types, use the following command. Generated files are located in the ***dist*** folder.
```sh
$ npm run build
```

### Link as node_module
If your dApp is using ***node_modules*** for dependencies, call the following command from your dApp's main folder.
### Install

Make sure that your dApp preserves *symbolic links* (symlink) as below command creates one inside your *node_modules* folder.
Latest stable version

```sh
$ npm link ../path/to/iam-client-lib/
``` sh
$ npm i iam-client-lib
```
The `iam-client-lib` folder must now exist in your *node_modules* folder.

### Add library as a dependency
Prerelease version

You can add this library as a dependency

```sh
$ npm i https://github.com/energywebfoundation/iam-client-lib.git#branch_name
``` sh
$ npm i iam-client-lib@canary
```


### Sample Import (TypeScript)
```sh

``` sh
import { IAM, CacheServerClient } from 'iam-client-lib';

export class Sample {
private _iam: IAM;


constructor() {
// create default cache server client (optional)
const cacheClient = new CacheServerClient({ url: 'http://cache-server.com'})
Expand All @@ -78,7 +67,26 @@ export class Sample {

```
## Development
### Installing Dependencies
Using `npm` to install dependencies:
``` sh
$ npm install
```
### Compile & Build
To generate bundled JS files and types, use the following command. Generated files are located in the ***dist*** folder.
``` sh
$ npm run build
```
## Active Maintainers
- [Kim Honoridez](https://github.com/kim-energyweb)
- [Daniel Wojno](https://github.com/dwojno)
- [Dmitry Fesenko](https://github.com/JGiter)
Expand All @@ -93,4 +101,4 @@ This project is licensed under the GNU General Public License v3.0 or later - se
## FAQ
Frequently asked questions and their answers will be collected here.
Frequently asked questions and their answers will be collected here.

0 comments on commit 2d59de6

Please sign in to comment.