Skip to content

Commit 7ef2ac4

Browse files
✨ feat(update): Allow to use .bin/node_modules.
1 parent 6ae32d8 commit 7ef2ac4

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.bin/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!/node_modules/

.bin/update

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ trap _trap SIGHUP SIGINT SIGTERM
205205

206206
echo '+ Looking up dotfiles'
207207
DOTFILES="$(cat "$HOME/.config/dotfiles/location")"
208+
NODE_MODULES=.bin/node_modules/
208209
PLUGINS="$HOME/.config/dotfiles/plugins"
209210

210211
if [ "$DOTFILES" = '' ] ; then
@@ -311,6 +312,15 @@ if $update ; then
311312
echo '+ Update dotfiles'
312313
sh "$DOTFILES"/bootstrap/dotfiles-update -f || _exit "$?"
313314

315+
if [ -d "${NODE_MODULES}" ] ; then
316+
echo ' * Node Modules @ '"${NODE_MODULES}"
317+
find "${NODE_MODULES}" -mindepth 1 -maxdepth 1 -type d |
318+
while read -r module ; do
319+
echo ' ° Install '"${HOME}/${module}"
320+
_do npm --prefix "${HOME}/${module}" clean-install
321+
done
322+
fi
323+
314324
fi
315325

316326
if $plugins ; then

0 commit comments

Comments
 (0)