google-docs-addon-svelte-template
A template repository to develop a Google Docs add-on with Svelte.
Getting Started
- Log in and authenticate with your Google account:
npm run clasp:login
- Create a new standalone project:
npm run clasp:create
- Deploy the project:
npm run deploy
- Open the project:
npm run clasp:open
Test the add-on
Once you followed the steps above and have the Apps Script project open, the following steps explain how to test the add-on:
- Click Run, then Test as add-on...
- Click Select Doc and choose a document you want to use for testing.
- Click Save
- In the *Execute Saved Test" section that appeared at the top, select your document and click Test.
- With the document now open, navigate to Add-ons | Google-docs-addon-svelte-template | My Add-on
This opens the Svelte sidebar.
Navigate to the sidebar
folder and develop & test the application as you would any regular Svelte application, i.e. npm run dev
.