[Pkg-javascript-devel] Circular dependencies
Xavier
yadd at debian.org
Fri Jul 12 11:29:54 BST 2019
Le 12/07/2019 à 11:54, Xavier a écrit :
> Hi all,
>
> I wrote a little wrapper around debtree to display circular dependencies
> (https://salsa.debian.org/yadd/djpt/blob/master/circular-deps).
>
> Example:
> $ circular-deps node-buble|graph-easy --png && firefox graph.png
>
> Or in text mode:
> $ circular-deps node-buble|graph-easy --as_boxart
>
> ┌────────────────────────────────────────────────────────┐
> │ │
> │ │
> │ ┌────────────────────────────────┐ │
> │ │ ▼ │
> │ ┌──────────────────────────┐ ┌────────────┐ ┌────────┐
> └▶ │ node-rollup-plugin-buble │ ──▶ │ node-buble │ ━━▶ │ rollup │
> └──────────────────────────┘ └────────────┘ └────────┘
> ▲ ┃
> ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
>
> Cheers,
> Xavier
Then to parse all repo in current directory:
$ for f in `find * -maxdepth 0 -type d \
-name 'node-*' \
-o -name '*.js' \
-o -name 'libjs-*'`
do
if circular-deps $f >/tmp/circ 2>/dev/null; then
echo "# Circular dependencies found in $f"
graph-easy --as_boxart <tmp/circ
else
echo "# No circular dependencies found in $f"
fi
done
More information about the Pkg-javascript-devel
mailing list