mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-01 22:47:48 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
305355beaf |
0
scripts/install-dotfiles.sh
Normal file → Executable file
0
scripts/install-dotfiles.sh
Normal file → Executable file
0
scripts/install-go-packages.sh
Normal file → Executable file
0
scripts/install-go-packages.sh
Normal file → Executable file
26
scripts/install-npm-packages.sh
Executable file
26
scripts/install-npm-packages.sh
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env zsh
|
||||||
|
# Install npm packages globally.
|
||||||
|
|
||||||
|
source "$HOME/.dotfiles/scripts/shared.sh"
|
||||||
|
|
||||||
|
if ! command -v npm &> /dev/null; then
|
||||||
|
msg_err "npm could not be found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
packages=(
|
||||||
|
# This is a tool to check if your files consider your .editorconfig rules.
|
||||||
|
"editorconfig-checker"
|
||||||
|
)
|
||||||
|
|
||||||
|
for pkg in "${packages[@]}"; do
|
||||||
|
# Trim spaces
|
||||||
|
pkg=${pkg// /}
|
||||||
|
# Skip comments
|
||||||
|
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
|
||||||
|
|
||||||
|
msg_run "Installing npm package:" "$pkg"
|
||||||
|
npm install -g --force "$pkg"
|
||||||
|
echo ""
|
||||||
|
done
|
||||||
|
|
||||||
0
scripts/shared.sh
Normal file → Executable file
0
scripts/shared.sh
Normal file → Executable file
Reference in New Issue
Block a user