{"_id":"rc-config-loader","_rev":"372944","name":"rc-config-loader","description":"load config file from .{product}rc.{json,yml,js}","dist-tags":{"latest":"4.0.0"},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"time":{"modified":"2021-07-27T06:08:16.000Z","created":"2017-02-12T08:54:59.065Z","4.0.0":"2021-01-10T02:32:34.197Z","3.0.0":"2019-11-03T05:07:17.102Z","2.0.5":"2019-11-02T01:17:16.921Z","2.0.4":"2019-07-07T12:52:16.143Z","2.0.3":"2019-05-27T15:05:50.864Z","2.0.2":"2018-08-07T10:44:45.663Z","2.0.1":"2017-11-26T00:15:33.912Z","2.0.0":"2017-05-21T07:28:39.142Z","1.0.2":"2017-02-12T09:05:58.602Z","1.0.1":"2017-02-12T08:54:59.065Z"},"users":{},"author":{"name":"azu"},"repository":{"type":"git","url":"git+https://github.com/azu/rc-config-loader.git"},"versions":{"4.0.0":{"name":"rc-config-loader","version":"4.0.0","description":"load config file from .{product}rc.{json,yml,js}","keywords":["config","configuration","json","loader","rc","yaml","yml"],"homepage":"https://github.com/azu/rc-config-loader","bugs":{"url":"https://github.com/azu/rc-config-loader/issues"},"repository":{"type":"git","url":"git+https://github.com/azu/rc-config-loader.git"},"license":"MIT","author":{"name":"azu"},"main":"lib/rc-config-loader.js","types":"lib/rc-config-loader.d.ts","directories":{"test":"test"},"scripts":{"build":"tsc -p .","prettier":"prettier --write '**/*.{js,jsx,ts,tsx,css}'","prepublish":"npm run --if-present build","test":"mocha \"test/**/*.{js,ts}\"","watch":"tsc -p . --watch"},"husky":{"hooks":{"post-commit":"git reset","pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx,css}":["prettier --write"]},"prettier":{"printWidth":120,"tabWidth":4},"dependencies":{"debug":"^4.1.1","js-yaml":"^4.0.0","json5":"^2.1.2","require-from-string":"^2.0.2"},"devDependencies":{"@types/json5":"^0.0.30","@types/mocha":"^8.2.0","@types/node":"^14.14.20","@types/require-from-string":"^1.2.0","chai":"^4.2.0","husky":"^4.2.3","lint-staged":"^10.1.1","mocha":"^8.2.1","prettier":"^2.0.2","ts-node":"^9.1.1","ts-node-test-register":"^9.0.1","typescript":"^4.1.3"},"gitHead":"694228309654967408cb7869a71175ce38b415ce","_id":"rc-config-loader@4.0.0","_nodeVersion":"14.15.3","_npmVersion":"6.14.9","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"shasum":"144cf31961c9f8ebcf252bd9c263fd40d62bd387","size":6825,"noattachment":false,"key":"/rc-config-loader/-/rc-config-loader-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rc-config-loader/download/rc-config-loader-4.0.0.tgz"},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rc-config-loader_4.0.0_1610245953943_0.5318655361315345"},"_hasShrinkwrap":false,"publish_time":1610245954197,"_cnpm_publish_time":1610245954197},"3.0.0":{"name":"rc-config-loader","version":"3.0.0","description":"load config file from .{product}rc.{json,yml,js}","keywords":["config","configuration","json","loader","rc","yaml","yml"],"homepage":"https://github.com/azu/rc-config-loader","bugs":{"url":"https://github.com/azu/rc-config-loader/issues"},"repository":{"type":"git","url":"git+https://github.com/azu/rc-config-loader.git"},"license":"MIT","author":{"name":"azu"},"main":"lib/rc-config-loader.js","types":"lib/rc-config-loader.d.ts","directories":{"test":"test"},"scripts":{"build":"cross-env NODE_ENV=production tsc -p .","prettier":"prettier --write '**/*.{js,jsx,ts,tsx,css}'","prepublish":"npm run --if-present build","test":"mocha \"test/**/*.{js,ts}\"","watch":"tsc -p . --watch"},"husky":{"hooks":{"post-commit":"git reset","pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx,css}":["prettier --write","git add"]},"prettier":{"printWidth":120,"tabWidth":4},"dependencies":{"debug":"^4.1.1","js-yaml":"^3.12.0","json5":"^2.1.1","require-from-string":"^2.0.2"},"devDependencies":{"@types/mocha":"^5.2.7","@types/node":"^12.12.5","chai":"^4.2.0","cross-env":"^6.0.3","husky":"^3.0.9","lint-staged":"^9.4.2","mocha":"^6.2.2","prettier":"^1.8.2","ts-node":"^8.4.1","ts-node-test-register":"^8.0.1","typescript":"^3.6.4"},"gitHead":"921be10f56088a273d3e46c1b41b3db38672f7e2","_id":"rc-config-loader@3.0.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"shasum":"1484ed55d6fb8b21057699c8426370f7529c52a7","size":7123,"noattachment":false,"key":"/rc-config-loader/-/rc-config-loader-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rc-config-loader/download/rc-config-loader-3.0.0.tgz"},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rc-config-loader_3.0.0_1572757636970_0.015981067604107668"},"_hasShrinkwrap":false,"publish_time":1572757637102,"_cnpm_publish_time":1572757637102},"2.0.5":{"directories":{"test":"test"},"author":{"name":"azu"},"license":"MIT","name":"rc-config-loader","version":"2.0.5","description":"load config file from .{product}rc.{json,yml,js}","main":"lib/rc-config-loader.js","scripts":{"test":"mocha test/","build":"cross-env NODE_ENV=production babel src --out-dir lib --copy-files --source-maps","watch":"babel src --out-dir lib --watch --source-maps","prepublish":"npm run --if-present build","prettier":"prettier --write '**/*.{js,jsx,ts,tsx,css}'"},"keywords":["rc","config","configuration","loader","json","yaml","yml"],"repository":{"type":"git","url":"git+https://github.com/azu/rc-config-loader.git"},"bugs":{"url":"https://github.com/azu/rc-config-loader/issues"},"homepage":"https://github.com/azu/rc-config-loader","dependencies":{"debug":"^4.1.1","js-yaml":"^3.12.0","json5":"^2.1.0","object-assign":"^4.1.0","object-keys":"^1.0.12","path-exists":"^3.0.0","require-from-string":"^2.0.2"},"devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/preset-env":"^7.0.0","@babel/register":"^7.0.0","babel-preset-jsdoc-to-assert":"^5.0.0","babel-preset-power-assert":"^3.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"^6.0.1","husky":"^3.0.0","lint-staged":"^9.1.0","mocha":"^6.1.4","power-assert":"^1.4.2","prettier":"^1.8.2"},"prettier":{"printWidth":120,"tabWidth":4},"lint-staged":{"*.{js,jsx,ts,tsx,css}":["prettier --write","git add"]},"husky":{"hooks":{"post-commit":"git reset","pre-commit":"lint-staged"}},"gitHead":"64342ad5d64e1a7598594c516d2d29308617f037","_id":"rc-config-loader@2.0.5","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"shasum":"81e78221167dbaa80877f2538f5e1a37c7e24ce3","size":8013,"noattachment":false,"key":"/rc-config-loader/-/rc-config-loader-2.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/rc-config-loader/download/rc-config-loader-2.0.5.tgz"},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rc-config-loader_2.0.5_1572657436684_0.7765312126975039"},"_hasShrinkwrap":false,"publish_time":1572657436921,"_cnpm_publish_time":1572657436921},"2.0.4":{"directories":{"test":"test"},"author":{"name":"azu"},"license":"MIT","name":"rc-config-loader","version":"2.0.4","description":"load config file from .{product}rc.{json,yml,js}","main":"lib/rc-config-loader.js","scripts":{"test":"mocha test/","build":"cross-env NODE_ENV=production babel src --out-dir lib --copy-files --source-maps","watch":"babel src --out-dir lib --watch --source-maps","prepublish":"npm run --if-present build","prettier":"prettier --write '**/*.{js,jsx,ts,tsx,css}'"},"keywords":["rc","config","configuration","loader","json","yaml","yml"],"repository":{"type":"git","url":"git+https://github.com/azu/rc-config-loader.git"},"bugs":{"url":"https://github.com/azu/rc-config-loader/issues"},"homepage":"https://github.com/azu/rc-config-loader","dependencies":{"debug":"^4.1.1","js-yaml":"^3.12.0","json5":"^2.1.0","object-assign":"^4.1.0","object-keys":"^1.0.12","path-exists":"^3.0.0","require-from-string":"^2.0.2"},"devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/preset-env":"^7.0.0","@babel/register":"^7.0.0","babel-preset-jsdoc-to-assert":"^5.0.0","babel-preset-power-assert":"^3.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"^6.0.1","husky":"^3.0.0","lint-staged":"^9.1.0","mocha":"^6.1.4","power-assert":"^1.4.2","prettier":"^1.8.2"},"prettier":{"printWidth":120,"tabWidth":4},"lint-staged":{"*.{js,jsx,ts,tsx,css}":["prettier --write","git add"]},"husky":{"hooks":{"post-commit":"git reset","pre-commit":"lint-staged"}},"gitHead":"a2d848bc1fa15cc3a4fc655ef32e0a9922d8659e","_id":"rc-config-loader@2.0.4","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"shasum":"fe23e26a87e2ec07541b29e7f37bfd75807a4c36","size":8027,"noattachment":false,"key":"/rc-config-loader/-/rc-config-loader-2.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/rc-config-loader/download/rc-config-loader-2.0.4.tgz"},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rc-config-loader_2.0.4_1562503936041_0.9061343843271339"},"_hasShrinkwrap":false,"publish_time":1562503936143,"_cnpm_publish_time":1562503936143},"2.0.3":{"directories":{"test":"test"},"author":{"name":"azu"},"license":"MIT","name":"rc-config-loader","version":"2.0.3","description":"load config file from .{product}rc.{json,yml,js}","main":"lib/rc-config-loader.js","scripts":{"test":"mocha test/","build":"cross-env NODE_ENV=production babel src --out-dir lib --copy-files --source-maps","watch":"babel src --out-dir lib --watch --source-maps","prepublish":"npm run --if-present build","prettier":"prettier --write '**/*.{js,jsx,ts,tsx,css}'","precommit":"lint-staged","postcommit":"git reset"},"keywords":["rc","config","configuration","loader","json","yaml","yml"],"repository":{"type":"git","url":"git+https://github.com/azu/rc-config-loader.git"},"bugs":{"url":"https://github.com/azu/rc-config-loader/issues"},"homepage":"https://github.com/azu/rc-config-loader","dependencies":{"debug":"^3.1.0","js-yaml":"^3.12.0","json5":"^1.0.1","object-assign":"^4.1.0","object-keys":"^1.0.12","path-exists":"^3.0.0","require-from-string":"^2.0.2"},"devDependencies":{"babel-cli":"^6.22.2","babel-preset-jsdoc-to-assert":"^4.0.0","babel-preset-latest":"^6.22.0","babel-preset-power-assert":"^1.0.0","babel-register":"^6.22.0","chai":"^3.5.0","cross-env":"^3.1.4","eslint":"^3.15.0","husky":"^0.14.3","lint-staged":"^5.0.0","mocha":"^3.2.0","power-assert":"^1.4.2","prettier":"^1.8.2"},"prettier":{"printWidth":120,"tabWidth":4},"lint-staged":{"*.{js,jsx,ts,tsx,css}":["prettier --write","git add"]},"gitHead":"530267b840eb604259545d14f013157b924c3922","_id":"rc-config-loader@2.0.3","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"shasum":"5fbe45784c3301b15350ab6507e023c33007928f","size":7644,"noattachment":false,"key":"/rc-config-loader/-/rc-config-loader-2.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/rc-config-loader/download/rc-config-loader-2.0.3.tgz"},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rc-config-loader_2.0.3_1558969550693_0.2632893498317743"},"_hasShrinkwrap":false,"publish_time":1558969550864,"_cnpm_publish_time":1558969550864},"2.0.2":{"directories":{"test":"test"},"author":{"name":"azu"},"license":"MIT","files":["bin/","lib/","src/"],"name":"rc-config-loader","version":"2.0.2","description":"load config file from .{product}rc.{json,yml,js}","main":"lib/rc-config-loader.js","scripts":{"test":"mocha test/","build":"cross-env NODE_ENV=production babel src --out-dir lib --copy-files --source-maps","watch":"babel src --out-dir lib --watch --source-maps","prepublish":"npm run --if-present build","prettier":"prettier --write '**/*.{js,jsx,ts,tsx,css}'","precommit":"lint-staged","postcommit":"git reset"},"keywords":["rc","config","configuration","loader","json","yaml","yml"],"repository":{"type":"git","url":"git+https://github.com/azu/rc-config-loader.git"},"bugs":{"url":"https://github.com/azu/rc-config-loader/issues"},"homepage":"https://github.com/azu/rc-config-loader","dependencies":{"debug":"^3.1.0","js-yaml":"^3.12.0","json5":"^1.0.1","object-assign":"^4.1.0","object-keys":"^1.0.12","path-exists":"^3.0.0","require-from-string":"^2.0.2"},"devDependencies":{"babel-cli":"^6.22.2","babel-preset-jsdoc-to-assert":"^4.0.0","babel-preset-latest":"^6.22.0","babel-preset-power-assert":"^1.0.0","babel-register":"^6.22.0","chai":"^3.5.0","cross-env":"^3.1.4","eslint":"^3.15.0","husky":"^0.14.3","lint-staged":"^5.0.0","mocha":"^3.2.0","power-assert":"^1.4.2","prettier":"^1.8.2"},"prettier":{"printWidth":120,"tabWidth":4},"lint-staged":{"*.{js,jsx,ts,tsx,css}":["prettier --write","git add"]},"gitHead":"baecd1ec66847135a473ebd89bfa81f02cedc678","_id":"rc-config-loader@2.0.2","_npmVersion":"6.2.0","_nodeVersion":"10.0.0","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"shasum":"46eb2f98fb5b2aa7b1119d66c0554de5133f1bc1","size":7598,"noattachment":false,"key":"/rc-config-loader/-/rc-config-loader-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/rc-config-loader/download/rc-config-loader-2.0.2.tgz"},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rc-config-loader_2.0.2_1533638685578_0.9532739180320451"},"_hasShrinkwrap":false,"publish_time":1533638685663,"_cnpm_publish_time":1533638685663},"2.0.1":{"directories":{"test":"test"},"author":{"name":"azu"},"license":"MIT","files":["bin/","lib/","src/"],"name":"rc-config-loader","version":"2.0.1","description":"load config file from .{product}rc.{json,yml,js}","main":"lib/rc-config-loader.js","scripts":{"test":"mocha test/","build":"cross-env NODE_ENV=production babel src --out-dir lib --copy-files --source-maps","watch":"babel src --out-dir lib --watch --source-maps","prepublish":"npm run --if-present build","prettier":"prettier --write '**/*.{js,jsx,ts,tsx,css}'","precommit":"lint-staged","postcommit":"git reset"},"keywords":["rc","config","configuration","loader","json","yaml","yml"],"repository":{"type":"git","url":"git+https://github.com/azu/rc-config-loader.git"},"bugs":{"url":"https://github.com/azu/rc-config-loader/issues"},"homepage":"https://github.com/azu/rc-config-loader","dependencies":{"debug":"^2.2.0","js-yaml":"^3.6.1","json5":"^0.5.0","object-assign":"^4.1.0","object-keys":"^1.0.9","path-exists":"^2.1.0","require-from-string":"^2.0.1"},"devDependencies":{"babel-cli":"^6.22.2","babel-preset-jsdoc-to-assert":"^4.0.0","babel-preset-latest":"^6.22.0","babel-preset-power-assert":"^1.0.0","babel-register":"^6.22.0","chai":"^3.5.0","cross-env":"^3.1.4","eslint":"^3.15.0","husky":"^0.14.3","lint-staged":"^5.0.0","mocha":"^3.2.0","power-assert":"^1.4.2","prettier":"^1.8.2"},"prettier":{"printWidth":120,"tabWidth":4},"lint-staged":{"*.{js,jsx,ts,tsx,css}":["prettier --write","git add"]},"gitHead":"1d643ce5b935543ca4c250c2f80257b65b10e9d4","_id":"rc-config-loader@2.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"shasum":"8c8452f59bdd10d448a67762dccf7c1b247db860","size":7640,"noattachment":false,"key":"/rc-config-loader/-/rc-config-loader-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rc-config-loader/download/rc-config-loader-2.0.1.tgz"},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rc-config-loader-2.0.1.tgz_1511655333850_0.9836412514559925"},"publish_time":1511655333912,"_hasShrinkwrap":false,"_cnpm_publish_time":1511655333912},"2.0.0":{"directories":{"test":"test"},"author":{"name":"azu"},"license":"MIT","files":["bin/","lib/","src/"],"name":"rc-config-loader","version":"2.0.0","description":"load config file from .{product}rc.{json,yml,js}","main":"lib/rc-config-loader.js","scripts":{"test":"mocha test/","build":"cross-env NODE_ENV=production babel src --out-dir lib --copy-files --source-maps","watch":"babel src --out-dir lib --watch --source-maps","prepublish":"npm run --if-present build"},"keywords":["rc","config","configuration","loader","json","yaml","yml"],"repository":{"type":"git","url":"git+https://github.com/azu/rc-config-loader.git"},"bugs":{"url":"https://github.com/azu/rc-config-loader/issues"},"homepage":"https://github.com/azu/rc-config-loader","dependencies":{"debug":"^2.2.0","js-yaml":"^3.6.1","json5":"^0.5.0","object-assign":"^4.1.0","object-keys":"^1.0.9","path-exists":"^2.1.0","require-uncached":"^1.0.3"},"devDependencies":{"babel-cli":"^6.22.2","babel-preset-jsdoc-to-assert":"^4.0.0","babel-preset-latest":"^6.22.0","babel-preset-power-assert":"^1.0.0","babel-register":"^6.22.0","chai":"^3.5.0","cross-env":"^3.1.4","eslint":"^3.15.0","mocha":"^3.2.0","power-assert":"^1.4.2"},"gitHead":"281cf1b0e656641bdb1c4041d932d9d738af80fa","_id":"rc-config-loader@2.0.0","_shasum":"20b56f87463f6b5cd97fc2da1f8e96c55321862d","_from":".","_npmVersion":"4.3.0","_nodeVersion":"7.2.0","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"shasum":"20b56f87463f6b5cd97fc2da1f8e96c55321862d","size":7185,"noattachment":false,"key":"/rc-config-loader/-/rc-config-loader-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rc-config-loader/download/rc-config-loader-2.0.0.tgz"},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rc-config-loader-2.0.0.tgz_1495351719023_0.8772994922474027"},"publish_time":1495351719142,"_hasShrinkwrap":false,"_cnpm_publish_time":1495351719142},"1.0.2":{"directories":{"test":"test"},"author":{"name":"azu"},"license":"MIT","files":["bin/","lib/","src/"],"name":"rc-config-loader","version":"1.0.2","description":"load config file from .{product}rc.{json,yml,js}","main":"lib/rc-config-loader.js","scripts":{"test":"mocha test/","build":"cross-env NODE_ENV=production babel src --out-dir lib --copy-files --source-maps","watch":"babel src --out-dir lib --watch --source-maps","prepublish":"npm run --if-present build"},"keywords":["rc","config","configuration","loader","json","yaml","yml"],"repository":{"type":"git","url":"git+https://github.com/azu/rc-config-loader.git"},"bugs":{"url":"https://github.com/azu/rc-config-loader/issues"},"homepage":"https://github.com/azu/rc-config-loader","dependencies":{"debug":"^2.2.0","js-yaml":"^3.6.1","json5":"^0.5.0","object-assign":"^4.1.0","object-keys":"^1.0.9","path-exists":"^2.1.0","require-uncached":"^1.0.3"},"devDependencies":{"babel-cli":"^6.22.2","babel-preset-jsdoc-to-assert":"^4.0.0","babel-preset-latest":"^6.22.0","babel-preset-power-assert":"^1.0.0","babel-register":"^6.22.0","chai":"^3.5.0","cross-env":"^3.1.4","eslint":"^3.15.0","mocha":"^3.2.0","power-assert":"^1.4.2"},"gitHead":"caf23e45fb8a812747c0527ffc94a8b68a12af76","_id":"rc-config-loader@1.0.2","_shasum":"c5e903ab36c22204f3cca9d9ddfd7e68fe3758eb","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"shasum":"c5e903ab36c22204f3cca9d9ddfd7e68fe3758eb","size":6796,"noattachment":false,"key":"/rc-config-loader/-/rc-config-loader-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/rc-config-loader/download/rc-config-loader-1.0.2.tgz"},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/rc-config-loader-1.0.2.tgz_1486890356699_0.6599703801330179"},"publish_time":1486890358602,"_cnpm_publish_time":1486890358602,"_hasShrinkwrap":false},"1.0.1":{"directories":{"test":"test"},"author":{"name":"azu"},"license":"MIT","files":["bin/","lib/","src/"],"name":"rc-config-loader","version":"1.0.1","description":"load config file from .{product}rc.{json,yml,js}","main":"lib/rc-config-loader.js","scripts":{"test":"mocha test/","build":"cross-env NODE_ENV=production babel src --out-dir lib --source-maps","watch":"babel src --out-dir lib --watch --source-maps","prepublish":"npm run --if-present build"},"keywords":["rc","config","configuration","loader","json","yaml","yml"],"repository":{"type":"git","url":"git+https://github.com/azu/rc-config-loader.git"},"bugs":{"url":"https://github.com/azu/rc-config-loader/issues"},"homepage":"https://github.com/azu/rc-config-loader","dependencies":{"debug":"^2.2.0","js-yaml":"^3.6.1","json5":"^0.5.0","object-assign":"^4.1.0","object-keys":"^1.0.9","path-exists":"^2.1.0","require-uncached":"^1.0.3"},"devDependencies":{"babel-cli":"^6.22.2","babel-preset-jsdoc-to-assert":"^4.0.0","babel-preset-latest":"^6.22.0","babel-preset-power-assert":"^1.0.0","babel-register":"^6.22.0","chai":"^3.5.0","cross-env":"^3.1.4","eslint":"^3.15.0","mocha":"^3.2.0","power-assert":"^1.4.2"},"gitHead":"0e084d76f6978cad3c93a7eff0bcc29059d045bd","_id":"rc-config-loader@1.0.1","_shasum":"5014030b3d72341e1e9eb548053765f4c41f3c9e","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"shasum":"5014030b3d72341e1e9eb548053765f4c41f3c9e","size":6599,"noattachment":false,"key":"/rc-config-loader/-/rc-config-loader-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rc-config-loader/download/rc-config-loader-1.0.1.tgz"},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/rc-config-loader-1.0.1.tgz_1486889698834_0.07038742257282138"},"publish_time":1486889699065,"_cnpm_publish_time":1486889699065,"_hasShrinkwrap":false}},"readme":"# rc-config-loader [![Actions Status: test](https://github.com/azu/rc-config-loader/workflows/test/badge.svg)](https://github.com/azu/rc-config-loader/actions?query=workflow%3A\"test\")\n\nLoad config from `.{product}rc.{json,yml,js}` file.\n\nIt is a Node.js library for loading `.textlintrc`, `.eslintrc`, `.stylelintrc` etc...\n\n## Features\n\nFind and load a configuration object from:\n\n- a `package.json` property if it is needed\n- a JSON or YAML, JS \"rc file\"\n    - `.<product>rc` or `.<product>rc.json` or `.<product>rc.js` or`.<product>rc.yml`, `.<product>rc.yaml`\n- TypeScript support\n    - Includes `.d.ts`\n\n## Difference\n\n### with [MoOx/rc-loader](https://github.com/MoOx/rc-loader \"MoOx/rc-loader\")\n\n- Safe API\n    - `rc` contains shabang in `.js` file\n- Enhance Error message\n\n### with [cosmiconfig](https://github.com/davidtheclark/cosmiconfig \"cosmiconfig\")\n\n- <del>Sync loading</del>\n    - [cosmiconfig@3+](https://github.com/davidtheclark/cosmiconfig/blob/master/CHANGELOG.md#300) support `sync` option\n- <del>Built-in TypeScript support</del>\n    - [comisconfig@6*](https://github.com/davidtheclark/cosmiconfig/blob/master/CHANGELOG.md#600) is written by TypeScript\n\nIf you want to async support and customize loader, recommended to use [cosmiconfig](https://github.com/davidtheclark/cosmiconfig).\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n    npm install rc-config-loader\n\n## Usage\n\n### API\n\n```ts\nexport interface rcConfigLoaderOption {\n    // does look for `package.json`\n    packageJSON?:\n        | boolean\n        | {\n              fieldName: string;\n          };\n    // if config file name is not same with packageName, set the name\n    configFileName?: string;\n    // treat default(no ext file) as some extension\n    defaultExtension?: string | string[];\n    // where start to load\n    cwd?: string;\n}\n/**\n * Find and load rcfile, return { config, filePath }\n * If not found any rcfile, throw an Error.\n * @param {string} pkgName\n * @param {rcConfigLoaderOption} [opts]\n * @returns {{ config: Object, filePath:string } | undefined}\n */\nexport declare function rcFile<R extends {}>(pkgName: string, opts?: rcConfigLoaderOption): {\n    config: R;\n    filePath: string;\n} | undefined;\n\n```\n\n`rcFile` return `{ config, filePath }` object.\n\n- `config`: it is config object\n- `filePath`: absolute path to config file\n\n**Note:**\n \n- `rcFile` function return `undefined` if the config file is not found\n- `rcFile` throw an Error if the config file content is malformed (causing a parsing error)\n\nRecommenced usage:\n\n```js\nimport { rcFile } from \"rc-config-loader\"\n\nfunction loadRcFile(rcFileName){\n    try {\n        const results = rcFile(rcFileName);\n        // Not Found\n        if (!results) {\n            return {};\n        }\n        return results.config;\n    } catch (error) {\n        // Found it, but it is parsing error\n        return {} ; // default value\n    }\n}\n// load config\nconst config = loadRcFile(\"your-application\");\nconsole.log(config); // => rcfile content\n```\n\nIt will check these files and return config file if found it.\n\n- `.your-applicationrc.json`\n- `.your-applicationrc.yml`\n- `.your-applicationrc.yaml`\n- `.your-applicationrc.js`\n- [optional] `package.json`\n  - if `packageJSON` option is enabled\n\n### Example\n\n```js\nimport { rcFile } from \"rc-config-loader\"\n// load .eslintrc from current dir\nconsole.log(rcFile(\"eslint\"));\n\n// load .eslintrc from specific path\nconsole.log(rcFile(\"eslint\", {\n    configFileName: `${__dirname}/test/fixtures/.eslintrc`\n}));\n/*\nconfig: { extends: 'standard',\n  rules:\n   { 'comma-dangle': [ 2, 'always-multiline' ],\n     'arrow-parens': [ 2, 'as-needed' ] } }\nfilePath: ${__dirname}/test/fixtures/.eslintrc\n */\n\n// load property from package.json\nconsole.log(rcFile(\"rc-config-loader\", {\n    packageJSON: {\n        fieldName: \"directories\"\n    }\n}));\n/*\nconfig: { test: 'test' }\nfilePath: /path/to/package.json\n */\n\n// load .eslintrc from specific dir\nconsole.log(rcFile(\"eslint\", {\n    cwd: `${__dirname}/test/fixtures`\n}));\n\n// load specific filename from current dir\nconsole.log(rcFile(\"travis\", {configFileName: \".travis\"}));\n/*\nconfig: { sudo: false, language: 'node_js', node_js: 'stable' }\nfilePath: /path/to/.travis\n */\n\n// try to load as .json, .yml, js\nconsole.log(rcFile(\"bar\", {\n    configFileName: `${__dirname}/test/fixtures/.barrc`,\n    defaultExtension: [\".json\", \".yml\", \".js\"]\n}));\n\n// try to load as foobar, but .foobarrc is not found\nconsole.log(rcFile(\"foorbar\")); // => undefined\n\n// try to load as .json, but it is not json\n// throw SyntaxError\ntry {\n    rcFile(\"unknown\", {\n        // This is not json\n        configFileName: `${__dirname}/test/fixtures/.unknownrc`,\n        defaultExtension: \".json\"\n    })\n} catch (error) {\n    console.log(error);\n    /*\n    SyntaxError: Cannot read config file: /test/fixtures/.unknownrc\n    */\n}\n```\n\n## Users\n\n- [textlint](https://github.com/textlint/textlint \"textlint\")\n\n## Changelog\n\nSee [Releases page](https://github.com/azu/rc-config-loader/releases).\n\n## Running tests\n\nInstall devDependencies and Run `npm test`:\n\n    npm i -d && npm test\n\n## Contributing\n\nPull requests and stars are always welcome.\n\nFor bugs and feature requests, [please create an issue](https://github.com/azu/rc-config-loader/issues).\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## Author\n\n- [github/azu](https://github.com/azu)\n- [twitter/azu_re](https://twitter.com/azu_re)\n\n## License\n\nMIT © azu\n\n## Acknowledgement\n\n- [zkochan/rcfile: Loads library configuration in all possible ways](https://github.com/zkochan/rcfile \"zkochan/rcfile: Loads library configuration in all possible ways\")\n\n**Difference**\n\n- support multiple `defaultExtension`  \n","_attachments":{},"homepage":"https://github.com/azu/rc-config-loader","bugs":{"url":"https://github.com/azu/rc-config-loader/issues"},"license":"MIT"}