GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lit/lit.dev: The Lit website

BranchesTags
Open more actions menu

Latest commit

 

History

1,423 Commits
1,423 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
packages
packages
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
.prettierignore
.prettierignore
 
 
.prettierrc.json
.prettierrc.json
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Dockerfile
Dockerfile
 
 
Dockerfile-discord-bot
Dockerfile-discord-bot
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
cloudbuild-cleanup.yaml
cloudbuild-cleanup.yaml
 
 
cloudbuild-discord-bot.yaml
cloudbuild-discord-bot.yaml
 
 
cloudbuild-main.yaml
cloudbuild-main.yaml
 
 
cloudbuild-pr.yaml
cloudbuild-pr.yaml
 
 
lit-dev.code-workspace
lit-dev.code-workspace
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.base.json
tsconfig.base.json
 
 

Repository files navigation

lit.dev

New site, new repo.

Packages

This is an npm workspaces monorepo.

  • lit-dev-content: Main content of lit.dev
  • lit-dev-server: Production web server for lit.dev
  • lit-dev-tools: Eleventy plugins and other internal tools

Developing

Install dependencies

npm ci

Develop site content

npm run dev

Serves at http://localhost:5415.

Dev mode is different to production in these ways:

  • Browser auto-reload.
  • CSS is not inlined or minified. CSS changes are reflected immediately.
  • JS is not inlined, bundled, bare-module transformed, or minified. JS changes are reflected immediately after tsc compile.
  • HTML is not minified.

If needed, you can check for dev mode from an Eleventy template using the env.DEV global:

{% if env.DEV %}
  <p>Dev mode</p>
{% else %}
  <p>Prod mode</p>
{% endif %}

Update generated API docs

First run npm run dev as shown above, and then in another terminal:

cd packages/lit-dev-api
npm run build:watch

You can now edit the comments in any .ts file in the lit directory, and after the automatic rebuild, the dev site will refresh.

code packages/lit-dev-api/lit/

The lit directory is a regular cloned git repo, so you can make changes directly here, and push PRs from it as normal. It's configured to track the main branch, but is pinned to a particular commit. To update the current commit, update the sha field in packages/lit-dev-tools-cjs/src/api-docs/configs/lit-2.ts.

Serve production mode

npm run build
npm start

Serves at http://localhost:6415

Watch production mode

npm start # production server

cd packages/lit-dev-content
npm run build:ts:watch     # TypeScript
npm run build:rollup:watch # Rollup
npm run build:eleventy:watch   # Eleventy

Serves at http://localhost:6415

Start production Docker environment locally

docker build -t litdev . --build-arg LITDEV_ENV=local
docker run --rm --name litdev -p 6415:6415 -e LITDEV_ENV=local -e MODE=main litdev
docker run --rm --name litdev-playground -p 6416:6416 -e LITDEV_ENV=local -e MODE=playground litdev

Serves at http://localhost:6415

Updating screenshots tests

Unless you are using Linux, screenshot test goldens need to be created by downloading artifacts from the "Integration Tests" Github Action.

If the integration tests fail, two .zip archives are generated as artifacts, which can be downloaded from the "Artifacts" menu in the top-right of the failing action:

  • screenshot-goldens.zip: New goldens which, if correct, can be extracted into packages/lit-dev-tests/src/playwright and committed as the new goldens:

    unzip screenshot-goldens.zip -d packages/lit-dev-tests/src/playwright
  • screenshot-diffs.zip: Expected, actuals, and diff screenshots. Can be extracted and viewed directly to help understand what failed.

Contributing Tutorials

See the Tutorial Contributing guide at packages/lit-dev-content/samples/tutorials/CONTRIBUTING.md

About

The Lit website

lit.dev

Resources

Readme
BSD-3-Clause license

Contributing

Contributing
Activity
Custom properties

Stars

140 stars

Watchers

13 watching

Forks

230 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.