- Checkout this Git project.
- Change to the project folder, ./brain-dump.
- Install Gas by running
npm i -g google-apps-script
- Run:
gas auth
- Run:
gas list
to find the list of script projects on Google Drive - While in ./brain-dump, run
gas link <projectName|projectId>
- gas link will overwrite the current folder content with whatever currently
in the Google Drive script project, we need to undo that using
git reset --hard HEAD
After a change has been made locally, the change can be sync'ed up with the
Google Drive project by runing gas push
.
While in ./brain-dump, install the following modules:
npm install --save-dev mocha
npm install --save-dev chai
npm install --save-dev sinon
Run the tests using npm test
.
The webapp has two deployment modes: production and development. The mode is
controlled by the value of GoogleDriveStorage.IN_DEV_MODE
.
When in production mode, data is written to this Goole Drive location: zzz-brain-dump/brain-dump.json.
When in dev mode, the file would be at zzz-brain-dump-dev/brain-dump.json.
Here are the steps to do to publish a new version (i.e. production release):
- Set the value of
GoogleDriveStorage.IN_DEV_MODE
totrue
; - Push the code to Google Drive (if not editting directly in Google Drive);
- Open the Script project in Google Drive, click on Publish -> Deploy as Web app and set the "Project version" to "new". Click Update afterward.
- Set the value of
GoogleDriveStorage.IN_DEV_MODE
tofalse
.