npm.sls 754 Bytes
Newer Older
kolbo's avatar
kolbo committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
nodejs_repo:
  pkgrepo.managed:
    - name: deb https://deb.nodesource.com/node_6.x bionic main
    - file: /etc/apt/sources.list.d/nodejs.list
    - key_url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
    - require_in:
      - nodejs_install

nodejs_install:
  pkg.latest:
    - pkgs:
      - nodejs
      - npm
      - build-essential
15 16
      - make

kolbo's avatar
kolbo committed
17 18 19 20 21 22 23
update_npm:
  cmd.run:
    - name: npm install -g npm
    - user: root
    - require:
      - nodejs_install

24 25 26 27 28 29 30 31 32 33 34
yarn_repo:
  pkgrepo.managed:
    - name: deb https://dl.yarnpkg.com/debian/ stable main
    - file: /etc/apt/sources.list.d/yarn.list
    - key_url: https://dl.yarnpkg.com/debian/pubkey.gpg
    - require_in:
      - yarn_install

yarn_install:
  pkg.latest:
    - pkgs:
kolbo's avatar
kolbo committed
35
      - yarn