box: node

build:
  steps:
    - npm-install

    - script:
      name: lint
      code: npm run lint

    - script:
      name: test with coverage
      code: |
        npm run --silent ci-test
        npm run --silent ci-cover

    - script:
      name: build
      code: npm run build

deploy:
  steps:
    - script:
      name: npm publish
      code: |
        npm config set unsafe-perm true
        echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
        npm publish . --tag latest
