box: node:argon

build:
  steps:
    - script:
        name: echo nodejs information
        code: |
          echo "node version $(node -v) running"
          echo "npm version $(npm -v) running"

    - npm-install

    - script:
        name: lint
        code: npm run lint

    - npm-test

  after-steps:
    - turistforeningen/slack-notifier:
        url: $SLACK_WEBHOOK_URL

deploy:
    steps:
        # Rebuild npm dependencies to fix broken symlinks
        # https://github.com/wercker/docs/issues/310
        - script:
            name: npm rebuild
            code: npm rebuild

        - npm-install

        - script:
            name: docker hub build
            code: |
                curl --verbose \
                    -H "Content-Type: application/json" \
                    -d "{\"docker_tag\": \"$DOCKER_TRIGGER_TAG\"}" \
                    -X POST $DOCKER_TRIGGER_URL

    after-steps:
        - turistforeningen/slack-notifier:
            url: $SLACK_WEBHOOK_URL

box: node:argon

build:
  steps:
    - script:
        name: echo nodejs information
        code: |
          echo "node version $(node -v) running"
          echo "npm version $(npm -v) running"

    - npm-install

    - script:
        name: lint
        code: npm run lint

    - npm-test

  after-steps:
    - turistforeningen/slack-notifier:
        url: $SLACK_WEBHOOK_URL

deploy:
    steps:
        # Rebuild npm dependencies to fix broken symlinks
        # https://github.com/wercker/docs/issues/310
        - script:
            name: npm rebuild
            code: npm rebuild

        - script:
            name: docker hub build
            code: |
                curl --verbose \
                    -H "Content-Type: application/json" \
                    -d "{\"docker_tag\": \"$DOCKER_TRIGGER_TAG\"}" \
                    -X POST $DOCKER_TRIGGER_URL

    after-steps:
        - turistforeningen/slack-notifier:
            url: $SLACK_WEBHOOK_URL

Remove unnecessary npm install from Wecker build step
Remove unnecessary npm install from Wecker build step
