Comparing version 5.0.0 to 5.0.1
{ | ||
"name": "configly", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "A developer-friendly lightweight replacement for the 'config' module that works with custom config directories and pluggable parsers", | ||
@@ -8,2 +8,3 @@ "main": "default.js", | ||
"lint": "eslint *.js test/*.js", | ||
"pretest": "is-node-modern 8 && ncc run test/ncc_webpack_bundler_test.js || is-node-not-modern 8", | ||
"test": "nyc --reporter=lcov --reporter=text --check-coverage --lines 99 --functions 99 --branches 99 tape test/*.js | tap-spec", | ||
@@ -60,6 +61,7 @@ "debug": "tape test/*.js | tap-spec" | ||
"fulcon": "^2.0.0", | ||
"precise-typeof": "^2.0.0", | ||
"precise-typeof": "^2.0.1", | ||
"stripbom": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@zeit/ncc": "^0.11.0", | ||
"coffeescript": "^2.3.2", | ||
@@ -71,2 +73,3 @@ "coveralls": "^3.0.2", | ||
"ini": "^1.3.4", | ||
"is-node-modern": "^1.0.0", | ||
"js-yaml": "^3.6.1", | ||
@@ -81,4 +84,4 @@ "json5": "^2.1.0", | ||
"tape": "^4.6.2", | ||
"toml": "^2.3.0" | ||
"toml": "^2.3.5" | ||
} | ||
} |
@@ -29,4 +29,11 @@ var path = require('path') | ||
// it's like this js file is included directly | ||
// from the file that required `configly` | ||
jsMod.parent = jsMod.parent.parent.parent; | ||
// from the file that included `configly` | ||
while (jsMod.parent | ||
&& typeof jsMod.parent.id === 'string' | ||
&& jsMod.parent.id.match(/\/node_modules\/configly\//) | ||
&& jsMod.parent.parent) { | ||
/* istanbul ignore next */ | ||
jsMod.parent = jsMod.parent.parent; | ||
} | ||
// generate node_modules paths for the file | ||
@@ -33,0 +40,0 @@ jsMod.paths = Module._nodeModulePaths(path.dirname(file)); |
@@ -124,3 +124,3 @@ # configly [![NPM Module](https://img.shields.io/npm/v/configly.svg?style=flat)](https://www.npmjs.com/package/configly) | ||
```javascript | ||
var config = require('configly/configure')('./etc'); // `require('configly')('etc');` would work the same way | ||
var config = require('configly/configure')({directories: './etc'}); // `require('configly')('etc');` would work the same way | ||
``` | ||
@@ -135,3 +135,3 @@ | ||
var path = require('path'); | ||
var config = require('configly/configure')(path.join(__dirname, 'etc')); | ||
var config = require('configly/configure')({directories: path.join(__dirname, 'etc')}); | ||
``` | ||
@@ -167,6 +167,6 @@ | ||
// "inline" | ||
var oneConfig = configly([ | ||
var oneConfig = configly({directories: [ | ||
path.join(__dirname, 'app-config'), | ||
path.join(__dirname, 'rules-config') | ||
]); | ||
]}); | ||
``` | ||
@@ -201,3 +201,4 @@ | ||
```javascript | ||
var config = configly('/etc', { | ||
var config = configly({ | ||
directories: '/etc', | ||
files: [ | ||
@@ -218,3 +219,4 @@ 'totally', | ||
```javascript | ||
var config = configly(path.join(__dirname, 'config'), { | ||
var config = configly({ | ||
directories: path.join(__dirname, 'config'), | ||
// `configly` will search for `/etc/consul/env.js`, `/etc/consul/env.json`, etc | ||
@@ -221,0 +223,0 @@ // after loading default files from local `config` folder |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
946
524
48915
18
25
Updatedprecise-typeof@^2.0.1