Skip to content

chore: added npm aliases and step to install them #179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions playbooks/roles/edxapp/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,10 @@ edxapp_npm_bin: "{{ edxapp_npm_dir }}/bin"
edxapp_settings: '{{ EDXAPP_SETTINGS }}'
EDXAPP_NODE_VERSION: "20"
EDXAPP_NPM_VERSION: "10.7.0"

NPM_ALIASES:
"@edx/brand": "npm:@edx/brand-edx.org@^2.1.3"

# This is where node installs modules, not node itself
edxapp_node_bin: "{{ edxapp_code_dir }}/node_modules/.bin"
edxapp_user: edxapp
Expand Down
13 changes: 13 additions & 0 deletions playbooks/roles/edxapp/tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,19 @@
- install
- install:app-requirements

# Installing npm aliases
- name: Install NPM aliases
shell: >
npm install {{ item.key }}@{{ item.value }} --no-save
args:
chdir: "{{ edxapp_code_dir }}"
environment: "{{ edxapp_environment | combine(git_ssh_environment_mixin) }}"
become_user: "{{ edxapp_user }}"
with_dict: "{{ NPM_ALIASES }}"
tags:
- install
- install:app-requirements

# The next few tasks set up the python code sandbox

# need to disable this profile, otherwise the pip inside the sandbox venv has no permissions
Expand Down