Skip to content

Commit

Permalink
Merge pull request #264 from progress/addBetterDoc
Browse files Browse the repository at this point in the history
Added better documentation to README.md
  • Loading branch information
joshualan authored Jul 9, 2019
2 parents c332c41 + 765ca69 commit e446162
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
41 changes: 41 additions & 0 deletions packages/node/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,47 @@ Progress® Data Objects in an OpenEdge business application can be accessed usin

The Data Source can be used by apps built as Node.js web apps.

### Usage

This is an npm package. This means that node and npm need to be installed to use it.

To use this package, you would normally just install it from the public NPM registry via an `npm install` command. You'll need to select a JSDO package depending on your environment:

```
# For vanilla JS, e.g. running it in a browser:
npm install @progress/jsdo-core
# For usage with node:
npm install @progress/jsdo-node
# For usage with Angular:
npm install @progress/jsdo-angular
# For usage with Nativescript:
npm install @progress/jsdo-nativescript
```

If you want to add changes and build packages yourself from this repository, you will need to use the scripts in `package.json`. The package.json in this folder corresponds to the `@progress/jsdo-node` package.

Here is a quick overview of the npm scripts:

`npm install`

> This installs the necessary dependencies that this package has and needs to be run at least once.
`npm run build:ds`

> This creates a `build` folder and produces in it a `progress.data.node.js` file that can be used either via including it in a `<script>` tag in an HTML file or via a `DataSource = require('/path/to/build/progress.data.node.js').DataSource;` in your Node app.
> In order to run this, you will need to run `npm install; npm run build:ds` from the packages/ng-datasource folder. This is a temporary measure.
`npm run test`

> This runs the `build:ds` script and then runs the Mocha tests found in the `test` folder. This can also be run manually by installing Mocha on your environment and then running `mocha --recursive` in the node folder.
`npm run lint`

> This runs a linter on the DataSource source files.
### License
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Expand Down
41 changes: 41 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,47 @@ The JSDO is a free and open-source full-featured implementation that can be used

Progress® Data Objects in an OpenEdge business application can be accessed using the JSDO on the client. For more information, see the <a href="https://docs.progress.com/bundle/data-object-guide/page/Overview-of-Progress-Data-Objects-Services-and-Catalogs.html">Overview of Progress Data Objects, Services and Catalogs.</a>

### Usage

This is an npm package. This means that node and npm need to be installed to use it.

To use the JSDO, you normally will simply install it from the public NPM registry via an `npm install`. You'll need to select a JSDO package depending on your environment:

```
# For vanilla JS, e.g. running it in a browser:
npm install @progress/jsdo-core
# For usage with node:
npm install @progress/jsdo-node
# For usage with Angular:
npm install @progress/jsdo-angular
# For usage with Nativescript:
npm install @progress/jsdo-nativescript
```

If you want to add changes and build packages yourself from this repository, you will need to use the scripts in `package.json`. The package.json in the root folder corresponds to the `@progress/jsdo-core` package.

Here is a quick overview of the npm scripts:

`npm install`

> This installs the necessary dependencies that the JSDO has and needs to be run at least once.
`npm run build:jsdo`

> This creates a `build` folder and produces in it a `progress.jsdo.js` file that can be used either via including it in a `<script>` tag or via a `progress = require('/path/to/build/progress.jsdo.js').progress;` in your Node app.
`npm run test`

> This runs the `build:jsdo` script and then runs the Mocha tests found in the `test` folder. This can also be run manually by installing Mocha on your environment and then running `mocha --recursive` in the JSDO folder.
`npm run lint`

> This runs `eslint` on the JSDO source files.

### JSDO and OpenEdge compatibility

| JSDO version | OpenEdge version |
Expand Down

0 comments on commit e446162

Please sign in to comment.