Browse Source

Salt: install the npm packages from package.json

merge-requests/70/head
Deimos 6 years ago
parent
commit
afe6c345f0
  1. 10
      salt/salt/nodejs.sls

10
salt/salt/nodejs.sls

@ -1,3 +1,5 @@
{% from "common.jinja2" import app_dir, app_username %}
# Add the NodeSource repository and install Node.js 10.x # Add the NodeSource repository and install Node.js 10.x
nodejs-pkgrepo: nodejs-pkgrepo:
pkgrepo.managed: pkgrepo.managed:
@ -10,3 +12,11 @@ nodejs-pkgrepo:
pkg.installed: pkg.installed:
- name: nodejs - name: nodejs
- refresh: True - refresh: True
# Install the npm packages defined in package.json
install-npm-packages:
npm.bootstrap:
- name: {{ app_dir }}
- user: {{ app_username }}
- require:
- pkg: nodejs
Loading…
Cancel
Save