gas-test-cli
v0.6.0
Published
Command Line Interface for gas-test
Downloads
43
Maintainers
Readme
gas-test-cli
CLI for gas-test
Installation
First, install gas-test-cli using npm (we assume you have pre-installed node.js).
npm install gas-test-cli --save-dev
Usage
- Get Credentials for Google Apps Script Execution API.
$(npm bin)/gas-test auth <client_secret.json>
- Create settings file.
Note: Change to scopes
values used by your test script.
gas-test.json:
{
"scriptId": "<YOUR_SCRIPT_ID_FOR_TEST>",
"scopes": ["https://www.googleapis.com/auth/drive"]
}
Build test code.
Options:
-t
,--typescript
: transpile with TypeScript-b
,--babel
: transpile with babel
$(npm bin)/gas-test --typescript build test/*.ts -o built.js
- Push test code via Google Apps Script API
$ clasp push
clasp is useful in order to push script to project on Google.
- Run test code using gas-test via Execution API.
$(npm bin)/gas-test run -c <path to credentials> -s <path to gas-test.json> -o <path to output>
License
Apache-2.0 © fossamagna