Skip to content

Commit

Permalink
[dist refactor] Rename cli-config to flatiron-cli-config
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Feb 13, 2012
1 parent 9fc4af4 commit 19db974
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
14 changes: 7 additions & 7 deletions README.md
@@ -1,9 +1,9 @@
# cli-config
# flatiron-cli-config

Encapsulated commands for managing configuration in flatiron CLI apps

## Example
At its core `cli-config` is a broadway-compatible plugin which can be used by any `flatiron` application:
At its core `flatiron-cli-config` is a broadway-compatible plugin which can be used by any `flatiron` application:

``` js
var flatiron = require('flatiron'),
Expand All @@ -16,13 +16,13 @@ At its core `cli-config` is a broadway-compatible plugin which can be used by an
app.name = 'app.js';
app.config.file({ file: 'test-config.json' });
app.use(flatiron.plugins.cli, {
usage: 'A simple CLI app using cli-config'
usage: 'A simple CLI app using flatiron-cli-config'
});

//
// Expose CLI commands using `cli-config`
// Expose CLI commands using `flatiron-cli-config`
//
app.use(require('cli-config'));
app.use(require('flatiron-cli-config'));

if (!module.parent) {
//
Expand Down Expand Up @@ -94,9 +94,9 @@ And the contents of `test-config.json` will be:
curl http://npmjs.org/install.sh | sh
```

### Installing cli-config
### Installing flatiron-cli-config
```
[sudo] npm install cli-config
[sudo] npm install flatiron-cli-config
```

## Run Tests
Expand Down
6 changes: 3 additions & 3 deletions examples/app.js
Expand Up @@ -9,13 +9,13 @@ var path = require('path'),
app.name = 'app.js';
app.config.file({ file: path.join(__dirname, 'test-config.json') });
app.use(flatiron.plugins.cli, {
usage: 'A simple CLI app using cli-config'
usage: 'A simple CLI app using flatiron-cli-config'
});

//
// Expose CLI commands using `cli-config`
// Expose CLI commands using `flatiron-cli-config`
//
app.use(require('../lib/cli-config'));
app.use(require('../lib/flatiron-cli-config'));

if (!module.parent) {
//
Expand Down
2 changes: 1 addition & 1 deletion lib/commands.js
Expand Up @@ -5,7 +5,7 @@
*
*/

var cliConfig = require('./cli-config');
var cliConfig = require('./flatiron-cli-config');

exports.usage = [
'`<app> config *` commands allow you to edit your',
Expand Down
6 changes: 3 additions & 3 deletions lib/cli-config.js → lib/flatiron-cli-config.js
@@ -1,5 +1,5 @@
/*
* cli-config.js: Top-level include for the `cli-config` module.
* flatiron-cli-config.js: Top-level include for the `flatiron-cli-config` module.
*
* (C) 2010, Nodejitsu Inc.
*
Expand All @@ -17,10 +17,10 @@ cliConfig.attach = function (options) {
options = options || {};

if (!app.plugins.cli) {
throw new Error('`cli` plugin is required to use `cli-config`');
throw new Error('`cli` plugin is required to use `flatiron-cli-config`');
}
else if (!app.config) {
throw new Error('`app.config` must be set to use `cli-config`');
throw new Error('`app.config` must be set to use `flatiron-cli-config`');
}

app.config.remove('literal');
Expand Down
8 changes: 4 additions & 4 deletions package.json
@@ -1,14 +1,14 @@
{
"name": "cli-config",
"name": "flatiron-cli-config",
"description": "Encapsulated commands for managing configuration in flatiron CLI apps",
"version": "0.1.0",
"version": "0.1.1",
"author": "Nodejitsu Inc <info@nodejitsu.com>",
"contributors": [
{ "name": "Charlie Robbins", "email": "charlie@nodejitsu.com" }
],
"repository": {
"type": "git",
"url": "http://github.com/flatiron/cli-config.git"
"url": "http://github.com/flatiron/flatiron-cli-config.git"
},
"peerDependencies": {
"flatiron": "~0.1.9"
Expand All @@ -18,7 +18,7 @@
"cli-easy": "0.1.x",
"vows": "0.6.x"
},
"main": "./lib/cli-config",
"main": "./lib/flatiron-cli-config",
"scripts": {
"test": "vows --spec --isolate"
},
Expand Down
4 changes: 2 additions & 2 deletions test/cli-config-test.js
Expand Up @@ -2,8 +2,8 @@
var assert = require('assert'),
vows = require('vows');

vows.describe('cli-config').addBatch({
"When a flatiron plugin uses `cli-config`": {
vows.describe('flatiron-cli-config').addBatch({
"When a flatiron plugin uses `flatiron-cli-config`": {
topic: require('../examples/app'),
"should correctly extend the object": function (app) {
assert.isObject(app.commands);
Expand Down
4 changes: 2 additions & 2 deletions test/commands-test.js
Expand Up @@ -7,8 +7,8 @@ var assert = require('assert'),
var examplesDir = path.join(__dirname, '..', 'examples'),
appBin = path.join(examplesDir, 'app.js');

cliEasy.describe('cli-config/commands')
.discuss('When using the cli-config plugin')
cliEasy.describe('flatiron-cli-config/commands')
.discuss('When using the flatiron-cli-config plugin')
.discuss('app config set testing 1234')
.use('node').args([appBin, 'config', 'set', 'testing', '1234'])
.expect('should update the config file', function () {
Expand Down

0 comments on commit 19db974

Please sign in to comment.