-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebdev.sh
executable file
·86 lines (70 loc) · 2.04 KB
/
webdev.sh
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/env bash
if test ! $(which npm); then
# Install npm
brew install npm
npm audit fix
npm init -y
npm install -g -f eslint
npm info "eslint-config-airbnb@latest" peerDependencies
npx install-peerdeps -g --dev eslint-config-airbnb
npm install -g coffeescript
npm install -g grunt-cli
npm install -g jshint
npm install -g less
npm install -g jest
npm install -g -f prettier
#functional programming tools for javascript
# https://monet.github.io/monet.js/
npm install monet --save
else
e_pending "Upgrading npm"
npm audit fix
npm i -g npm@latest
test_command "npm"
npm upgrade coffeescript
npm upgrade grunt-cli
npm upgrade jshint
npm upgrade less
npm upgrade jest
npm upgrade prettier
#functional programming tools for javascript
# https://monet.github.io/monet.js/
npm upgrade monet --save
fi
if test ! $(which eslint); then
if has_command "npm"; then
e_pending "Installing/Upgrading eslint/airbnb/prettier combo"
npx install-peerdeps -g eslint-config-airbnb
npm install -f -g prettier eslint-config-prettier eslint-plugin-prettier
test_command "eslint"
test_command "prettier"
fi
else
brew upgrade npm
fi
if test ! $(which n); then
e_pending "Installing n"
brew install n
test_command "n"
else
brew upgrade n
fi
if test ! $(which yarn); then
e_pending "Installing yarn (with Node)"
brew install yarn
test_command "yarn"
else
brew reinstall yarn
fi
# globally apply esline settings https://www.tracylum.com/blog/2017-12-28-setting-up-eslint-globally/
yarn global add eslint eslint-config-airbnb eslint-plugin-jsx-a11y@^2.0.0 eslint-plugin-react eslint-plugin-import eslint-parser
read -p "Do you wish to Lando for Drupal9 local development (Please answer y/n)? " yn
case $yn in
[Yy]*) brew install --cask lando ;;
*) echo "Please answer yes or no." ;;
esac
read -p "Do you wish to Docksal for Drupal9 local development (Please answer y/n)? " yn
case $yn in
[Yy]*) DOCKER_NATIVE=1 bash <(curl -fsSL https://get.docksal.io) ;;
*) echo "Please answer yes or no." ;;
esac