<commit_before>---

- name: get nvm
  become: true
  become_user: "{{ user }}"
  get_url:
    url: https://raw.githubusercontent.com/creationix/nvm/v0.31.4/install.sh
    dest: /tmp/nvm-install
    mode: 0755

- name: get fish path
  become: true
  become_user: "{{ user }}"
  shell: which fish
  register: fish_path

- name: install nvm
  become: true
  become_user: "{{ user }}"
  shell: /tmp/nvm-install

- name: install node(s)
  become: true
  become_user: "{{ user }}"
  shell: "nvm install {{ item }}"
  args:
    executable: "{{ fish_path.stdout }}"
  with_items:
    - 4
    - 5
    - 6

- name: set current node version
  become: true
  become_user: "{{ user }}"
  shell: nvm use 5
  args:
    executable: "{{ fish_path.stdout }}"

- name: set system node version
  become: true
  become_user: "{{ user }}"
  shell: nvm alias default 5
  args:
    executable: "{{ fish_path.stdout }}"

- include: 'arch.yml'
  when: ansible_os_family == 'Archlinux'
- include: 'debian.yml'
  when: ansible_os_family == 'Debian'
- include: 'macos.yml'
  when: ansible_os_family == 'Darwin'
<commit_msg>feat(roles/node): install some node command line tools<commit_after>---

- name: get nvm
  become: true
  become_user: "{{ user }}"
  get_url:
    url: https://raw.githubusercontent.com/creationix/nvm/v0.31.4/install.sh
    dest: /tmp/nvm-install
    mode: 0755

- name: get fish path
  become: true
  become_user: "{{ user }}"
  shell: which fish
  register: fish_path

- name: install nvm
  become: true
  become_user: "{{ user }}"
  shell: /tmp/nvm-install

- name: install node(s)
  become: true
  become_user: "{{ user }}"
  shell: "nvm install {{ item }}"
  args:
    executable: "{{ fish_path.stdout }}"
  with_items:
    - 4
    - 5
    - 6

- name: set current node version
  become: true
  become_user: "{{ user }}"
  shell: nvm use 5
  args:
    executable: "{{ fish_path.stdout }}"

- name: set system node version
  become: true
  become_user: "{{ user }}"
  shell: nvm alias default 5
  args:
    executable: "{{ fish_path.stdout }}"

- include: 'arch.yml'
  when: ansible_os_family == 'Archlinux'
- include: 'debian.yml'
  when: ansible_os_family == 'Debian'
- include: 'macos.yml'
  when: ansible_os_family == 'Darwin'

- name: install global npm packages
  become: true
  become_user: "{{ user }}"
  shell: "npm install -g {{ item }}"
  args:
    executable: "{{ fish_path.stdout }}"
  with_items:
    - emoj
    - eslint
    - eslint-config-standard
    - eslint-config-standard-react
    - eslint-plugin-react
    - eslint-plugin-standard
    - nyancat
    - standard
    - wifi-password

{'fraction_non_alphanumeric': 0.14494425221068818, 'fraction_numerical': 0.009996155324875048, 'mean_word_length': 2.906906906906907, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3918068', 'n_tokens_mistral': 994, 'n_tokens_neox': 984, 'n_words': 239}