-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de18404
commit 5de9d8a
Showing
3 changed files
with
39 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Documentation | ||
|
||
You can see below the API reference of this module. | ||
|
||
### `Cobol(input, options, callback)` | ||
Runs COBOL code from Node.JS side. | ||
|
||
#### Params | ||
- **Function|String|Path** `input`: A function containing a comment with inline COBOL code, the cobol code itself or a path to a COBOL file. | ||
- **Object** `options`: An object containing the following fields: | ||
- `cwd` (String): Where the COBOL code will run (by default in the current working directory) | ||
- `args` (Array): An array of strings to pass to the COBOL process. | ||
- `free` (Boolean): Use free option while compiling with GnuCobol | ||
- `stdin` (Stream): An optional stdin stream used to pipe data to the stdin stream of the COBOL process. | ||
- `stderr` (Stream): An optional stderr stream used to pipe data to the stdin stream of the COBOL process. | ||
- `stdeout` (Stream): An optional stdout stream used to pipe data to the stdin stream of the COBOL process. | ||
- **Function** `callback`: The callback function called with `err`, `stdout` and `stderr`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
[![cobol](http://i.imgur.com/DutRzDr.png)](#) | ||
|
||
# cobol [![PayPal](https://img.shields.io/badge/%24-paypal-f39c12.svg)][paypal-donations] [![Version](https://img.shields.io/npm/v/cobol.svg)](https://www.npmjs.com/package/cobol) [![Downloads](https://img.shields.io/npm/dt/cobol.svg)](https://www.npmjs.com/package/cobol) [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github) | ||
|
@@ -8,6 +9,7 @@ | |
|
||
Of course, you can! It's production ready! If you ever did such a thing, [ping me (@IonicaBizau)](https://twitter.com/IonicaBizau). :boom: :dizzy: | ||
|
||
|
||
## Installation | ||
|
||
Currently GNUCobol is required. If you are using a debian-based distribution you can install it using: | ||
|
@@ -24,7 +26,9 @@ Then, install the `cobol` package. | |
$ npm i cobol | ||
``` | ||
|
||
## Example | ||
## :clipboard: Example | ||
|
||
|
||
|
||
```js | ||
// Dependencies | ||
|
@@ -101,7 +105,8 @@ Cobol(function () { /* | |
// => ------------ | ||
``` | ||
|
||
## Documentation | ||
## :memo: Documentation | ||
|
||
|
||
### `Cobol(input, options, callback)` | ||
Runs COBOL code from Node.JS side. | ||
|
@@ -117,10 +122,13 @@ Runs COBOL code from Node.JS side. | |
- `stdeout` (Stream): An optional stdout stream used to pipe data to the stdin stream of the COBOL process. | ||
- **Function** `callback`: The callback function called with `err`, `stdout` and `stderr`. | ||
|
||
## Press Highlights | ||
|
||
|
||
## :newspaper: Press Highlights | ||
|
||
This project seems to more popular than I expected. :smile: If you wrote or found an article about this project which is not added in this list, [add it][contributing]. | ||
|
||
|
||
- [Calling 1959 from your Web code: A COBOL bridge for Node.js](http://arstechnica.com/information-technology/2015/08/calling-1959-from-your-web-code-a-cobol-bridge-for-node-js/) ([ArsTechnica](http://arstechnica.com/), by [Sean Gallagher](http://arstechnica.com/author/sean-gallagher/)) | ||
- [Cobol -- yes, Cobol -- gets a bridge to Node.js](http://www.infoworld.com/article/2972314/application-development/cobol-nodejs-bridge.html) ([InfoWorld](http://www.infoworld.com/), by [Paul Krill](http://www.infoworld.com/author/Paul-Krill/)) | ||
- [Ein COBOL-Plug-in für Node.js](http://www.heise.de/newsticker/meldung/Ein-COBOL-Plug-in-fuer-Node-js-2783225.html) ([Heise Online](http://heise.de), by [Alexander Neumann](http://www.heise.de/ix/editors/ix_redakteur_907177.html)) | ||
|
@@ -131,15 +139,17 @@ This project seems to more popular than I expected. :smile: If you wrote or foun | |
- [Sur GitHub, un projet relie Cobol et Node.js](http://www.lemondeinformatique.fr/actualites/lire-sur-github-un-projet-relie-cobol-et-nodejs-62116.html) ([LeMondeInformatique](http://lemondeinformatique.fr/), by [Maryse Gros avec IDG News Service](mailto:[email protected])) | ||
- [3 open source projects for modern COBOL development](http://opensource.com/life/15/10/open-source-cobol-development) ([OpenSource.com](http://opensource.com/), by [Joshua Allen Holm](http://opensource.com/users/holmja)) | ||
|
||
## How to contribute | ||
|
||
## :yum: How to contribute | ||
Have an idea? Found a bug? See [how to contribute][contributing]. | ||
|
||
## Where is this library used? | ||
## :dizzy: Where is this library used? | ||
If you are using this library in one of your projects, add it in this list. :sparkles: | ||
|
||
- [`cobol-promises`](https://github.com/IonicaBizau/node-cobol-promises) | ||
|
||
## License | ||
- [`cobol-promises`](https://github.com/IonicaBizau/node-cobol-promises)—COBOL bridge for NodeJS with promises support. | ||
|
||
## :scroll: License | ||
|
||
[MIT][license] © [Ionică Bizău][website] | ||
|
||
|
@@ -149,4 +159,4 @@ If you are using this library in one of your projects, add it in this list. :spa | |
[license]: http://showalicense.com/?fullname=Ionic%C4%83%20Biz%C4%83u%20%3Cbizauionica%40gmail.com%3E%20(http%3A%2F%2Fionicabizau.net)&year=2013#license-mit | ||
[website]: http://ionicabizau.net | ||
[contributing]: /CONTRIBUTING.md | ||
[docs]: /DOCUMENTATION.md | ||
[docs]: /DOCUMENTATION.md |