AlaskaAirlines / auro-input

Custom HTML element for inputting string data in forms
https://auro.alaskaair.com/components/auro/input
Apache License 2.0
2 stars 4 forks source link

Add SSR Support #281

Closed blackfalcon closed 7 months ago

blackfalcon commented 7 months ago

Discussed in https://github.com/AlaskaAirlines/WC-Generator/discussions/457

Originally posted by **blackfalcon** January 9, 2024 As of Lit 2.0 it's been understood that LitElement web components will be supported inside common SSR environments. This discussion is for supporting the various updates needed to deliver this capability.

Scope

NOTICE: When updating dependencies, DO NOT update test-runner - See issue https://github.com/AlaskaAirlines/auro-input/issues/279

The scope of this issue is to update the repo with the following criteria

  1. install the auro-library as root dependency
  2. add type="module" to the ./package.json
  3. commitlint.config.js → commitlint.config.cjs
  4. delete the following local scripts
    • . /packageScripts/postinstall.(m)js
    • ./scripts/generateDocs.(m)js
    • ./scripts/postCss.(m)js
    • ./scripts/pre-commit.(m)js
  5. Update the ./package.json "scripts" references
"build:docs": "node ./node_modules/@aurodesignsystem/auro-library/scripts/build/generateDocs.mjs",
"preCommit": "node ./node_modules/@aurodesignsystem/auro-library/scripts/build/pre-commit.mjs",
"postCss:component": "node ./node_modules/@aurodesignsystem/auro-library/scripts/build/postCss.mjs",
"postinstall": "node ./node_modules/@aurodesignsystem/auro-library/scripts/build/postinstall.mjs",

Exit criteria

This issue can be closed once the local files have been deleted, the dependencies and scripts have been updated and the rebuilds successfully off of the auro-library resources.

All local dependencies should be up to date as well.