4 Commits

Author SHA1 Message Date
Elisha Nuchi 31befe1d68 V3: Migrate to Vite (#221)
This is version 3 of the boilerplate, which makes significant changes to the build script and local development tooling. It replaces Webpack with Vite, which required some significant changes to how the local development setup works with Google Apps Script.

A new dev-server-wrapper.html file is used as the wrapper app in development, which is a standalone html + js file instead of a React app. This reduces the need for a complex build step for the wrapper app. Instead the file is just copied over for each entrypoing and the file location is changed with a "replace" step.

Due to the way Vite works, the html templates are changed a bit to support local development.

Vite doesn't easily allow completely separate multiple builds, so some Vite plugins and custom plugins are written to support multiple entrypoints (sidebars/dialogs). The externalization for large packages is now handled in the Vite config instead of a plugin, and by manually adding in the script tags into the index.html templates.

Additional changes here:
- yarn is now used instead of npm as package manager
- eslint configs are updated to support vite
- GitHub workflows for tests are updated to use yarn and other minor changes such as node versions and OS.
- A VS Code launch.json configuration is provided
- Dev wrapper setup has been updated (see above description)
- ES Modules (import/export) updated throughout
- Unneeded packages supporting webpack configurations are removed. Many packages have been upgraded. NPM scripts have been updated to use yarn.
- Removed `import React` due to Vite config.
- Added script tags to each template since webpack externalization plugin is no longer used
- Added <script type="module" src="./index.jsx"></script> to index.html templates to support Vite local development
- Changed src/server/sheets.js to .ts typescript as exemplar
- Updated tests to support yarn commands, Vite changes, and listening for Vite stdout triggers.
- Add Vite-style tsconfig.json
- README is updated
2024-05-20 00:25:31 -04:00
Elisha Nuchi 5f2012ce56 Update integration tests and package versions (#211)
* Update gas-types-detailed package

* Update LICENSE

* update node versions and macos versions in workflows

* add NODE_OPTIONS env: max_old_space_size=4096

* support new log-in flow
2024-03-22 01:40:15 -04:00
Elisha Nuchi fd73dc051c Webpack 5 support with updated packages (#131)
- Update to Webpack 5
- Use @effortlessmotion dynamic html and inline source plugins
- Remove .clasp.json and use SAMPLE file
- Consistent prettier formatting throughout
- Update packages to latest versions

Co-authored-by: Kevin Malakoff <kmalakoff@gmail.com>
2022-06-20 01:59:26 -04:00
Elisha Nuchi 89c12fa161 Set up end to end tests (#121)
* initial e2e test setup with jest and puppeteer

* Update package-lock.json

* WIP e2e setup

* finish setting up end to end tests

* extend open addon time

* build local version and change background color

* update pink image snapshot

* hide no "done" callback jest lint error

* first draft of integration test CI automation

* add .env file during CI

* add puppeteer and update .env

* try mac-os

* try separate build step

* add local deploy step

* extend time

* print body text

* set user agent

* rearrange console logs

* remove console logs

* console page

* try loading in own window

* install mkcert in CI

* fix indentation

* test local body text

* bump time

* revert to loading in add on

* bump time

* print page body

* add stealth plugin and update puppeteer

* update jest and jest-puppeteer versions to latest

* use custom jest-puppeteer environment

allows connecting to Google account using stealth plugin

* update threshold

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* test console

* switch to clasp 2.3.1

* increase timeout

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update package.json

* try mac os 10.15

* Update integration-tests.yaml

* run node 12,14

* Update global-teardown.js

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* sudo mkcert

* Update integration-tests.yaml

* try running not in bash

* try windows 2016

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update open-addon.js

* Update open-addon.js

* Update open-addon.js

* Update open-addon.js

* Update open-addon.js

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* add timeout

* test recovery email

* bypass account recovery page

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* test New-SelfSignedCertificate

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* add powershell script

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* Update integration-tests.yaml

* test script

* Update integration-tests.yaml

* add generate-cert.ps1

* restructure test files

* Update generate-cert.ps1

* bump failure threshold

* fix install mkcert

* remove consoles

* Update package.json

* Update integration-tests.yaml

* try forceExit flag

* test exec in global setup

* restructure

* Update integration-tests.yaml

* remove ?. null check

* add 4 OSs: macos-10.15, macos-latest, windows-2019, windows-latest

* test mac 10.15

* Update integration-tests.yaml

* use all OSs

* -Keyexportpolicy Exportable

* Update generate-cert.ps1

* Update integration-tests.yaml

* update os

* -KeyExportPolicy 'Exportable'

* Update integration-tests.yaml

* update test readme

* Update integration-tests.yaml

* add non-extended integration test

* add non-extended snapshots

* update snapshot names

* change name

* add basic integration tests pipeline file

* Update local-development.test.js

* update os's

* test s3 image reporter

* allowSizeMismatch: true

* update test local url to localhost:3000/dialog-demo-bootstrap.html

* try medium font render hinting

* Update jest-puppeteer.config.js

* update screenshots

* check resolution

* open page when wds is ready

* change screen resolution

* change to 2560 1440 resolution

* test 790 width

* change back to 800

* test all mac versions

* rename container

* skip s3 image reporting if missing env variables

* try windows

* add OS specific tests

* fix image names

* Update image-reporter.js

* Update package.json

* upload windows

* Update image-reporter.js

* test new font

* try all OSs

* remove OS-specific test setup

* update extended snapshots

* rename tests

* Update integration-tests-extended.yaml

* Update integration-tests-basic.yaml

* extend timeout

* Update jest.config.js

* Update README.md

* Update local-development.test.js

* revert to 0.04 threshold

* add comment

* remove push trigger for basic test

* extend timeout
2022-03-12 22:51:30 -05:00