Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pksunkara committed Mar 28, 2012
0 parents commit ac1d726
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 0 deletions.
19 changes: 19 additions & 0 deletions LICENSE
@@ -0,0 +1,19 @@
Copyright (c) 2011 Nodejitsu Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
67 changes: 67 additions & 0 deletions README.md
@@ -0,0 +1,67 @@
# flatiron-cli-ok
Encapsulated logic for showing ok in flatiron CLI apps

## Installation
```
npm install flatiron-cli-ok
```

## Usage
At its core `flatiron-cli-ok` is a broadway-compatible plugin which can be used by any [flatiron](https://flatironjs.org) application

```js
var flatiron = require('flatiron')
, app = flatiron.app;

//
// Configure the Application to be a CLI app with
// a JSON configuration file `test-config.json`
//
app.name = 'app.js';

app.use(flatiron.plugins.cli, {
usage: 'A simple CLI app using flatiron-cli-ok'
});

app.use(require('flatiron-cli-ok'));

if (!module.parent) {
app.start();
}
```

If you run the above script

```bash
$ node app.js
```

The output will be

```bash
```

If you like this project, please watch this and [follow](http://github.com/users/follow?target=pksunkara) me.

## Testing
```
npm test
```

## Contributors
Here is a list of [Contributors](http://github.com/pksunkara/flatiron-cli-ok/contributors)

### TODO

__I accept pull requests and guarantee a reply back within a day__

## License
MIT/X11

## Bug Reports
Report [here](http://github.com/pksunkara/flatiron-cli-ok/issues). __Guaranteed reply within a day__.

## Contact
Pavan Kumar Sunkara (pavan.sss1991@gmail.com)

Follow me on [github](http://github.com/pksunkara), [twitter](http://twitter.com/pksunkara)
21 changes: 21 additions & 0 deletions index.js
@@ -0,0 +1,21 @@
/*
* index.js: Top-level include for flatiron-cli-ok
*
* (C) 2012, Pavan Kumar Sunkara
*
*/

var path = require('path');

var cliOk = exports = module.exports;

cliOk.name = 'cli-ok';

cliOk.attach = function (options) {
var app = this;
options = options || {};

if (!app.plugins.cli) {
throw new Error('`cli` plugin is required to use `flatiron-cli-ok`');
}
};
39 changes: 39 additions & 0 deletions package.json
@@ -0,0 +1,39 @@
{
"name": "flatiron-cli-ok",
"version": "0.1.0",
"author": "Pavan Kumar Sunkara <pavan.sss1991@gmail.com> (pksunkara.github.com)",
"description": "Encapsulated logic for showing ok in flatiron CLI apps",
"main": "./index",
"repository": {
"type": "git",
"url": "git://github.com/pksunkara/flatiron-cli-ok.git"
},
"keywords": [
"flatiron",
"cli",
"ok",
"plugin"
],
"homepage": "http://pksunkara.github.com/flatiron-cli-ok",
"scripts": {},
"contributors": [
{
"name": "Pavan Kumar Sunkara",
"email": "pavan.sss1991@gmail.com"
}
],
"dependencies": {},
"devDependencies": {},
"engines": {
"node": ">=0.6"
},
"bugs": {
"url": "https://github.com/pksunkara/flatiron-cli-ok/issues"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/pksunkara/flatiron-cli-ok/raw/master/LICENSE"
}
]
}

0 comments on commit ac1d726

Please sign in to comment.