apps-script-starter icon indicating copy to clipboard operation
apps-script-starter copied to clipboard

Add a watch script that auto-deploys on changes

Open jappareti opened this issue 6 years ago • 3 comments

It'd be nice to be able to watch for changes and auto-deploy them. The workflow is a little cumbersome because on every change you need to run npm run deploy.

Here's my current workflow:

  1. Make a change and save the file
  2. Run npm run deploy
  3. Switch to the browser and navigate to the Google Doc with the Add-on installed and enabled with Latest code.
  4. Refresh the page to get newest changes

Coming from other dev workflows, it just feels a little old-school to have to manually deploy and refresh when developing.

It'd be nice to have something like this:

  1. Run npm run watch or npm run dev (watches for changes)
  2. Make a change and save file (auto-deploys)
  3. Auto-reload browser page with Google Doc

Nice work on this, by the way! Everything else is great!

jappareti avatar Aug 10 '18 18:08 jappareti

@jappareti I think that solution for this could be gulpjs.com (it's task runner). You can write a little script that will check if any file hes changed and run npm run deploy

PrzeOr82 avatar Apr 23 '19 09:04 PrzeOr82

@jappareti another solution could be nodemon. You can set it to watch the dist directory and run the deploy command on changes.

jlarmstrongiv avatar May 16 '19 19:05 jlarmstrongiv

@jappareti

You need use the webpack config for this. Just add watch: true to the exports.

oshliaer avatar Jul 08 '19 12:07 oshliaer

This issue is closed due to no recent activity. If you are encountering a similar issue, please create a new one. Thank you.

labnol avatar Apr 06 '23 15:04 labnol