---
- name: Create folders for static files
  file: path={{ item }}
        state=directory
        owner=root
        group=nih-wayfinding
        mode=0775
  with_items:
    - "{{ app_static_root }}"
    - "{{ app_media_root }}"
    - "{{ app_static_cache }}"

- name: Install Sass
  gem: name=sass
       version="{{ app_sass_version }}"
       user_install=no
       state=present

- name: Install application javascript dependencies
  command: npm install
  args:
    chdir: "{{ app_home }}"

- name: Create static files (staging/production)
  command: npm run build
  args:
    chdir: "{{ app_home }}"
  when: not_developing

- name: Create static files (development)
  command: npm run build-debug
  args:
    chdir: "{{ app_home }}"
  when: developing

---
- name: Create folders for static files
  file: path={{ item }}
        state=directory
        owner=root
        group=nih-wayfinding
        mode=0775
  with_items:
    - "{{ app_static_root }}"
    - "{{ app_media_root }}"
    - "{{ app_static_cache }}"

- name: Install Sass
  gem: name=sass
       version="{{ app_sass_version }}"
       user_install=no
       state=present

- name: Install Compass
  gem: name=compass
       user_install=no
       state=present

- name: Install grunt-cli and bower
  command: npm install -g bower grunt-cli
  args:
    chdir: "{{ app_home }}"

- name: Install application javascript dependencies (npm)
  command: npm install
  sudo: no
  args:
    chdir: "{{ app_home }}"

- name: Install application javascript dependencies (bower)
  command: bower install
  sudo: no
  args:
    chdir: "{{ app_home }}"

- name: Create static files (staging/production)
  command: grunt build
  sudo: no
  args:
    chdir: "{{ app_home }}"
  when: not_developing

Install angular build dependencies in ansible
Install angular build dependencies in ansible

Includes:
  - gem compass
  - npm -g grunt-cli bower
  - npm install
  - bower install
  - grunt build if not_developing
