Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.16 KB

how-to-use-gas-include.md

File metadata and controls

38 lines (27 loc) · 1.16 KB

gas logo

How to use gas-include, from A to Z

What is it

Gas-include is a public package repository for Google Apps Script code. Together with the 'gas include' command it allows for easy reuse of Google Apps Script code.

How to use a package

E.g. usage of the 'sheet' package.

$ gas include -s sheet

This will add the latest version of the 'sheet' package to your gas-include.json file prefixed with a caret (^) and will then recalculate your gas-include folder according to semver rules.

Now you can use the methods of the package by prefixing them with the package name.
So in case of 'sheet':

  • sheet_getValue(row, column, sheet)
  • sheet_setValue(row, column, sheet, value)

Available packages right now are:

How to publish a package to gas-include

Create a gas-include.json. Gas init can help you with that.

$ gas init

When your gas-include.json is ready you simply execute:

$ gas publish