Skip to content

Commit 20197a9

Browse files
committed
Move node modules folder to vagrant-dev
We should avoid changing the /vagrant shared folder if at all possible. This is needed for consistency with provisioning docker containers.
1 parent 6dab557 commit 20197a9

File tree

4 files changed

+14
-21
lines changed

4 files changed

+14
-21
lines changed

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ FLASH_PATH=$(PREFIX)/src/ggrc/static/flash
3232
STATIC_PATH=$(PREFIX)/src/ggrc/static
3333
BOWER_PATH=$(PREFIX)/bower_components
3434
DEV_BOWER_PATH=$(DEV_PREFIX)/bower_components
35-
BOWER_BIN_PATH=/usr/local/lib/node_modules/ggrc-core/node_modules/bower/bin/bower
35+
BOWER_BIN_PATH=/vagrant-dev/node_modules/bower/bin/bower
3636

3737
$(APPENGINE_SDK_PATH) : $(APPENGINE_ZIP_PATH)
3838
@echo $( dirname $(APPENGINE_ZIP_PATH) )

Diff for: provision/roles/ggrc/tasks/main.yml

+5-10
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,24 @@
3838
user_install: no
3939
state: present
4040

41-
- name: install global npm modules
42-
sudo: yes
43-
with_items: ggrc_global_npm_modules
44-
npm:
45-
name: "{{ item.name }}"
46-
global: yes
47-
state: present
48-
4941
- name: install local npm modules
5042
sudo: no
5143
with_items: ggrc_local_npm_modules
5244
npm:
5345
name: "{{ item.name }}"
5446
state: present
55-
path: "/vagrant/node_modules"
47+
path: "/vagrant-dev/node_modules"
48+
49+
- name: link node_modules
50+
command: ln -s /vagrant-dev/node_modules /vagrant/node_modules
5651

5752
- name: run make appengine
5853
command: make appengine DEV_PREFIX=/vagrant-dev
5954
args:
6055
chdir: /vagrant
6156

6257
- name: run make bower_components
63-
command: make bower_components
58+
command: make bower_components DEV_PREFIX=/vagrant-dev
6459
args:
6560
chdir: /vagrant
6661

Diff for: provision/roles/ggrc/templates/.bashrc.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
112112
fi
113113
source /vagrant/bin/init_vagrant_env
114114

115-
export NODE_PATH=/usr/local/lib/node_modules/
115+
export NODE_PATH=/vagrant-dev/node_modules/
116116
export TERM=xterm-color
117117
export EDITOR=vim
118118
PS1='\[\033[01;35m\]\u@\h\[\033[01;34m\] \w \n\$\[\033[00m\] '

Diff for: provision/roles/ggrc/vars/main.yml

+7-9
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,18 @@ ggrc_development_directories:
2424
- name: /vagrant-dev/tmp
2525
- name: /vagrant/tmp
2626

27-
ggrc_global_npm_modules:
28-
- name: nodeunit
29-
- name: pegjs
30-
- name: karma-cli
31-
- name: karma-junit-reporter
32-
- name: jasmine-core
33-
- name: mkdirp
27+
ggrc_local_npm_modules:
3428
- name: bower
3529
- name: eslint
3630
- name: eslint-config-google
37-
38-
ggrc_local_npm_modules:
31+
- name: jasmine-core
3932
- name: karma
33+
- name: karma-cli
4034
- name: karma-jasmine
35+
- name: karma-junit-reporter
36+
- name: mkdirp
37+
- name: nodeunit
38+
- name: pegjs
4139

4240
ggrc_gems:
4341
- name: 'sass'

0 commit comments

Comments
 (0)