diff --git a/.gitignore b/.gitignore index 73deff1565..c115c61f35 100644 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,4 @@ grammar/jison-* pimple.json playbook.retry +npm-debug.log diff --git a/Makefile b/Makefile index 56f0e08fd8..369f5ca8b0 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,16 @@ install: + make install_composer + make install_assets + +install_composer: composer install + +install_assets: rm -rf ./node_modules rm -rf ./www/assets rm -rf ./www/bower_components npm install + ./node_modules/bin/gulp build config: @php bin/console compile:configuration diff --git a/node_modules/.gitkeep b/node_modules/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/resources/ansible/roles/app/tasks/main.yml b/resources/ansible/roles/app/tasks/main.yml index 621bea7789..ea161da69f 100644 --- a/resources/ansible/roles/app/tasks/main.yml +++ b/resources/ansible/roles/app/tasks/main.yml @@ -6,9 +6,18 @@ shell: export NVM_DIR="$HOME/.nvm" &&. "$NVM_DIR/nvm.sh" && npm install -g bower recess - name: Initialize application dependencies + shell: make install_composer become: yes become_user: vagrant - shell: make + ignore_errors: yes + args: + chdir: /vagrant/ + +- name: Initialize and build application assets + shell: export NVM_DIR="$HOME/.nvm" &&. "$NVM_DIR/nvm.sh" && make install_assets + become: yes + become_user: vagrant + ignore_errors: yes args: chdir: /vagrant/