Skip to content

Instantly share code, notes, and snippets.

@StephenFluin
Created July 11, 2018 21:47
Show Gist options
  • Save StephenFluin/0f06b4a575c7e08e556b78469e18e912 to your computer and use it in GitHub Desktop.
Save StephenFluin/0f06b4a575c7e08e556b78469e18e912 to your computer and use it in GitHub Desktop.
Install Angular on a *nix system
# NVM
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install 10
# Yarn
curl -o- -L https://yarnpkg.com/install.sh | bash
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
yarn global add @angular/cli
@joriatyBen
Copy link

joriatyBen commented Aug 25, 2020

You could run it via nix-shell

with import <nixpkgs> {};
stdenv.mkDerivation rec {
  name = "ng";
  env = buildEnv { name = name; paths = buildInputs; };
  buildInputs = [
    nodejs-12_x
    yarn
    nodePackages."@angular/cli"
  ];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment