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

- name: Delete any existing node_modules folder/file
  file: path={{ app_home }}/node_modules
        state=absent

- name: Symlink the node_modules cache into the project root
  file: src={{ app_node_modules_cache }}
        dest={{ app_home }}/node_modules
        state=link
        owner=root
        group=nyc-trees

- name: Install Sass
  gem: name=sass
       version=3.4.9
       user_install=no
       state=present

- name: Install application javascript dependencies
  npm: path={{ app_home }}
  sudo_user: nyc-trees

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

- name: Create static files and run collectstatic (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=nyc-trees
        mode=0775
  with_items:
    - "{{ app_static_root }}"
    - "{{ app_media_root }}"
    - "{{ app_node_modules_cache }}"
    - "{{ app_static_cache }}"

- name: Delete any existing node_modules folder/file
  file: path={{ app_home }}/node_modules
        state=absent

- name: Symlink the node_modules cache into the project root
  file: src={{ app_node_modules_cache }}
        dest={{ app_home }}/node_modules
        state=link
        owner=root
        group=nyc-trees

- name: Install Sass
  gem: name=sass
       version=3.4.9
       user_install=no
       state=present

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

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

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

Switch from npm module to calling npm directly
Switch from npm module to calling npm directly

A new npm package, `gulp-ruby-sass`, was added in 7de060d.
The npm ansible module appears to not have picked up this up, and
`gulp-ruby-sass` was not installed.

Switching to calling `npm install` directly did install the package.
