-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.hooks
More file actions
28 lines (23 loc) · 658 Bytes
/
.hooks
File metadata and controls
28 lines (23 loc) · 658 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
# Hooks
quit="y"
cmd=""
cmd_alias=""
# File
config_file="package.json"
# Package Manager
package_manager="npm"
install_frozen="rm -rf node_modules && npm cache clean --force && npm ci"
if [[ ${SWPM+x} ]]; then
package_manager="swpm"
install_frozen="scf"
fi
if [[ -f "lerna.json" ]]; then
install_frozen="npm run clean:frozen && npm run init:frozen"
fi
add_source ~/.dotfiles/hooks/pre_command
add_source ~/.dotfiles/hooks/pre_alias
add_source ~/.dotfiles/hooks/pre_danger
add_source ~/.dotfiles/hooks/pre_validation
add_source ~/.dotfiles/hooks/pos_validation
autoload -U add-zsh-hook # Load the zsh hook module