@the-grid/caliper

0.8.0 • Public • Published

Caliper Build Status

Measurement library for The Grid content, handling different media and non-media types.

Local testing

First make sure you have all dependencies installed (check .travis.yml file to a list of dependencies on Ubuntu):

npm install

Make sure you have the environment variables set:

  • AMAZON_API_BUCKET: AWS bucket we use for uploading processed images for tests
  • AMAZON_API_ID: Our ID on AWS
  • AMAZON_API_REGION: Our region on AWS
  • AMAZON_API_TOKEN: Access token on AWS

(Please ask some Caliper maintainer about env vars if you want to use it for local development).

Use the following command to run tests locally:

grunt

It is also helpful to run tests for only a pattern, e.g. for running image related tests:

grunt test --grep "measuring images"

Specifications

Caliper deals with many media and non-media (e.g. text only html blocks). You can find more information about schemas for those types and their calculated measurements in The Grid's API docs.

Tools

To run Caliper on some image URL and draw measurements:

./bin/caliperize <SOME IMAGE URL>

Readme

Keywords

none

Package Sidebar

Install

npm i @the-grid/caliper

Weekly Downloads

74

Version

0.8.0

License

proprietary

Last publish

Collaborators

  • d4tocchini
  • grid-bot-ios
  • grid-bot-android
  • gridbot-ds
  • gridbot-web
  • gridbot-apis