nix-config/sh/languages/401-node

28 lines
662 B
Plaintext
Raw Normal View History

2018-08-31 22:06:12 +02:00
#!/bin/sh
#
# Node lets us write JavaScript code outside of the browser.
#
# Yarn is the preferred dependency manager, however, some programs
# have npm hard-coded as a dependency, so we install that as well.
#
2018-09-10 23:04:55 +02:00
# We set the yarn prefix to /usr/local so libraries installed
# globally with yarn are automatically in our $PATH.
#
# We enable emojis since our terminal (termite) supports them. A
# nice addition for some added flair.
#
2018-08-31 22:06:12 +02:00
# https://wiki.archlinux.org/index.php/Node.js
2018-09-10 23:04:55 +02:00
# https://yarnpkg.com/en/docs/cli/global
2018-08-31 22:06:12 +02:00
set -xe
sudo pacman -S nodejs
2018-08-31 22:06:12 +02:00
sudo pacman -S npm
2018-08-31 22:06:12 +02:00
sudo pacman -S yarn
2018-09-10 23:04:55 +02:00
yarn config set prefix /usr/local
yarn config set -- --emoji true