Skip to content

Commit

Permalink
rename modules from strong- to sl-, and increment version
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-github committed Jul 12, 2013
1 parent 8905351 commit 7da2e30
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# sl-config-loader
v0.0.1
# strong-config-loader

## Install

slnode install sl-config-loader
slnode install strong-config-loader

## Example

Expand All @@ -16,7 +15,7 @@ Given a nested structure of directories and config files:
/my-sub-resource
config.json

The `sl-config-loader` recursively loads and caches all `config.json` files.
The `strong-config-loader` recursively loads and caches all `config.json` files.

var ConfigLoader = require('../');

Expand Down Expand Up @@ -50,4 +49,4 @@ Overrides the config based on the current `NODE_ENV`.

It is safe/performant to call `ConfigLoader.load` during http requests and other latency sensitive operations.

The `sl-config-loader` is designed to load configuration that changes at runtime. To support this, the loader caches results for a specified `ttl` (time to live) and returns that result even if a config file has changed. Once the `ttl` runs out for a given config root, the loader checks the files last modified time (`mtime`) and compares it to the cache's last modified time. If the file has changed the new file is loaded from disk. The purpose of this complex checking is to support config loading in latency sensitive operations (eg. handling an http request).
The `strong-config-loader` is designed to load configuration that changes at runtime. To support this, the loader caches results for a specified `ttl` (time to live) and returns that result even if a config file has changed. Once the `ttl` runs out for a given config root, the loader checks the files last modified time (`mtime`) and compares it to the cache's last modified time. If the file has changed the new file is loaded from disk. The purpose of this complex checking is to support config loading in latency sensitive operations (eg. handling an http request).
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* sl-config-loader ~ public api
* config-loader ~ public api
*/

module.exports = require('./lib/config-loader');
module.exports = require('./lib/config-loader');
6 changes: 3 additions & 3 deletions lib/config-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module.exports = ConfigLoader;
* Module dependencies.
*/

var TaskEmitter = require('sl-task-emitter')
, debug = require('debug')('sl-config-loader')
var TaskEmitter = require('strong-task-emitter')
, debug = require('debug')('strong-config-loader')
, util = require('util')
, inherits = util.inherits
, fs = require('fs')
Expand Down Expand Up @@ -254,4 +254,4 @@ function merge(target, src) {
}

return dst
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "sl-config-loader",
"name": "strong-config-loader",
"description": "recursively load config files",
"version": "0.0.3",
"version": "0.0.4",
"scripts": {
"test": "mocha"
},
"license": "MIT",
"dependencies": {
"debug": "latest",
"sl-task-emitter": "0.0.x",
"strong-task-emitter": "~0.0.1",
"deepmerge": "~0.2.5"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions test/support.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* sl-config-loader test setup and support.
* config-loader test setup and support.
*/

assert = require('assert');
assert = require('assert');

0 comments on commit 7da2e30

Please sign in to comment.