/google-spreadsheet-addon

Contains the source code of the `Santiment Data` google sheets plugin

Primary LanguageJavaScript

google-spreadsheet-addon

Contains the source code of the SANsheets google spreadsheet add-on.

Usage

Development

The project is based on clasp and gas-local to enable local development and testing. Most of the Google functions has been mocked in order to work locally, check gas_mock for reference. The src directory contains the source code that will be pushed to the google apps webeditor. Changing code directly in the webeditor is not recommended apart from debugging because it will get wiped out next time someone pushes.

Prerequisites

  • node.js >= 6.3.0
  • npm
  • npx : if your npm installation is old and you don't have npx, install it with: sudo npm i -g npx

Installation

Install dependencies:

$ npm install

Testing

You can run the whole tests suite with:

$ npm test

Unit tests only:

$ npm run test:unit

Integration tests only:

$ npm run test:integration

Run the test suite in a docker container. Build the image:

$ docker build -f Dockerfile-test -t google-spreadsheet-addon-tests .

and then run the tests:

$ docker run -t google-spreadsheet-addon-tests

Generate documentation

$ npm run docs

Pushing to webeditor

You first need to log into clasp:

  $ npx clasp login

Push changes:

$ npm run push