Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
IonicaBizau committed Apr 26, 2016
1 parent de18404 commit 5de9d8a
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 9 deletions.
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Expand Up @@ -59,6 +59,8 @@ Contributions are more than welcome!

Thanks! :sweat_smile:



[1]: https://github.com/IonicaBizau/node-cobol/issues

[2]: https://github.com/IonicaBizau/code-style
[2]: https://github.com/IonicaBizau/code-style
18 changes: 18 additions & 0 deletions DOCUMENTATION.md
@@ -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`.

26 changes: 18 additions & 8 deletions README.md
@@ -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)
Expand All @@ -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:
Expand All @@ -24,7 +26,9 @@ Then, install the `cobol` package.
$ npm i cobol
```

## Example
## :clipboard: Example



```js
// Dependencies
Expand Down Expand Up @@ -101,7 +105,8 @@ Cobol(function () { /*
// => ------------
```

## Documentation
## :memo: Documentation


### `Cobol(input, options, callback)`
Runs COBOL code from Node.JS side.
Expand All @@ -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))
Expand All @@ -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:redac_weblmi@it-news-info.com))
- [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]

Expand All @@ -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

0 comments on commit 5de9d8a

Please sign in to comment.