Files
runner-images/images/linux/scripts/installers/nodejs.sh
T

30 lines
1.1 KiB
Bash
Raw Normal View History

2020-10-07 13:49:40 +05:00
#!/bin/bash -e
2019-11-15 15:23:41 -05:00
################################################################################
## File: nodejs.sh
## Desc: Installs Node.js LTS and related tooling (Gulp, Grunt)
2019-11-15 15:23:41 -05:00
################################################################################
# Install LTS Node.js and related build tools
2020-02-07 15:17:43 +03:00
curl -sL https://raw.githubusercontent.com/mklement0/n-install/stable/bin/n-install | bash -s -- -ny -
2019-11-15 15:23:41 -05:00
~/n/bin/n lts
npm install -g grunt gulp n parcel-bundler typescript newman vercel
2019-11-15 15:23:41 -05:00
npm install -g --save-dev webpack webpack-cli
# Install the Netlify CLI using --unsafe-perm=true options to avoid permission issues
npm install -g --unsafe-perm=true netlify-cli
echo "Creating the symlink for [now] command to vercel CLI"
ln -s /usr/local/bin/vercel /usr/local/bin/now
2019-11-15 15:23:41 -05:00
rm -rf ~/n
# Install Yarn repository and key
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
apt-get update
# Install yarn
apt-get install -y --no-install-recommends yarn
invoke_tests "Tools" "Node.js"