Comparing version 3.6.0 to 3.7.0
@@ -54,4 +54,9 @@ #!/usr/bin/env node | ||
const madge = require('../lib/api'); | ||
const config = Object.assign({}, rc); | ||
let packageConfig = {}; | ||
try { | ||
packageConfig = require(path.join(process.cwd(), 'package.json')).madge; | ||
} catch (e) { } | ||
const config = Object.assign(rc, packageConfig); | ||
program.options.forEach((opt) => { | ||
@@ -58,0 +63,0 @@ const name = opt.name(); |
# CHANGELOG | ||
## v3.7.0 (Jan 30, 2020) | ||
* Support package.json config (Thanks to @zekth) | ||
## v3.6.0 (Nov 11, 2019) | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "madge", | ||
"version": "3.6.0", | ||
"version": "3.7.0", | ||
"author": "Patrik Henningsson <patrik.henningsson@gmail.com>", | ||
@@ -24,3 +24,3 @@ "repository": "git://github.com/pahen/madge", | ||
"engines": { | ||
"node": ">=6.x.x" | ||
"node": ">=10.x.x" | ||
}, | ||
@@ -27,0 +27,0 @@ "main": "./lib/api", |
@@ -223,4 +223,6 @@ <p align="center"> | ||
> Note that when running the CLI it's possible to use a runtime configuration file. The config should placed in `.madgerc` in your project or home folder. Look [here](https://github.com/dominictarr/rc#standards) for alternative locations for the file. Here's an example: | ||
You can use configuration file either in `.madgerc` in your project or home folder or directly in `package.json`. Look [here](https://github.com/dominictarr/rc#standards) for alternative locations for the file. | ||
> .madgerc | ||
```json | ||
@@ -237,2 +239,19 @@ { | ||
> package.json | ||
```json | ||
{ | ||
"name": "foo", | ||
"version": "0.0.1", | ||
... | ||
"madge": { | ||
"fontSize": "10px", | ||
"graphVizOptions": { | ||
"G": { | ||
"rankdir": "LR" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
# CLI | ||
@@ -239,0 +258,0 @@ |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
75822
126
1784
482
12