Use this template as a starting point to develop your own Google Apps Scripts applications.
Mainly purposed to work with Google Sheets.
- Create a new Google Sheet
- Open the attached script (Tools > Script Editor)
- Copy the script id from the url, and paste it in the file
.clasp.json
- Install clasp globally, and enable Google Apps Script API (follow the instructions in the Clasp docs)
- Note that it may take some minutes for the Google Apps Script API activation to take effect
- Push the local files to the remote script:
clasp push
CLASP works similar to git.
Push changes to google apps script: clasp push
Pull changes from google apps script: clasp pull
npm run push
, push committed changes to git and push any changes (committed or not) to google apps script
Google Apps Script does not accept imports / exports. Before running the unit tests locally, uncomment any module.exports
Before pushing to the Google Apps Script, comment any module.exports
in any files you push
Run unit tests: npm run test