From cc489907984b8fee1ecf4b75c2d8ebcd889f4912 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Tue, 12 Mar 2019 16:51:27 +0100 Subject: [PATCH] Use NPM module in matrix-appservice-discord --- roles/matrix-appservice-discord/tasks/main.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/roles/matrix-appservice-discord/tasks/main.yml b/roles/matrix-appservice-discord/tasks/main.yml index e3ed0b1..a43642b 100644 --- a/roles/matrix-appservice-discord/tasks/main.yml +++ b/roles/matrix-appservice-discord/tasks/main.yml @@ -15,18 +15,20 @@ become_user: matrix-appservice-discord # Setup dependencies +# May create issues with package-lock.json not in gitignore - name: Install matrix-appservice-discord dependencies - command: npm ci - args: - chdir: /var/local/matrix-appservice-discord/matrix-appservice-discord + npm: + path: /var/local/matrix-appservice-discord/matrix-appservice-discord become: true become_user: matrix-appservice-discord # Typescript into javascript - name: Compile matrix-appservice-discord - command: npm run build + command: ./node_modules/.bin/tsc args: chdir: /var/local/matrix-appservice-discord/matrix-appservice-discord + register: npm_build_result + changed_when: npm_build_result become: true become_user: matrix-appservice-discord