- name: Install Frontend Accounting NPM
  command: "npm install"
  ignore_errors: yes
  args:
      chdir: "{{orchard_frontend_accounting_revenue_document_root}}"
  tags:
    - orchard-frontend-accounting-revenue-init
# TODO add check if previous failed
- name: Update Frontend Accounting NPM
  command: "npm update"
  ignore_errors: yes
  args:
      chdir: "{{orchard_frontend_accounting_revenue_document_root}}"
  tags:
    - orchard-frontend-accounting-revenue-init

- name: Run i18n
  command: "POEDITOR_PROJECT_ID={{orchard.services.frontend_accounting.config.POEDITOR_PROJECT_ID}} npm run i18n"
  ignore_errors: yes
  args:
      chdir: "{{orchard_frontend_accounting_revenue_document_root}}"
  tags:
    - orchard-frontend-accounting-revenue-init

- name: Npm build
  command: "npm run build"
  ignore_errors: yes
  args:
      chdir: "{{orchard_frontend_accounting_revenue_document_root}}"
  tags:
    - orchard-frontend-accounting-revenue-init
