Giter Site home page Giter Site logo

html-template's Introduction

LitElement Template

A zero-dependency, zero-build starter repository for lit-element

Setup

There are two keyed strings that you will need to find and replace in order to get started.

%project-name% makes the name of your project appear in the package.json, web app manifest, Firebase configuration files, document.title, and boilerplate header

%firebase-config% needs to be replaced firebase-app.mjs in order to use Firebase

File Organization

Files are organized as

Type imports
Variable imports

Module Constants

Type definitions

Module implementations

Implementations are ordered so that dependent functions are placed below code that calls them in a way that they can be hoisted. An exception is for utility functions that are used throughout the module, especally if they are also exported.

Contents

This template provides a variety of prepackaged tools

npm scripts

  • npm install to install development tools. This project has no build dependencies, so this step is optional
  • npm run start for easy local server that runs src/index.html in SPA mode
  • npm run test to automatically run Jest and linters
  • npm run lint to just run the linters
  • npm run deployprod to deploy to your production Firebase config
  • npm run deploydev to deploy to your development Firebase config

Development tools

  • Eslint for linting
  • Prettier for code formatting
  • Typescript for type checking
    • Type definitions for Lit, and Firebase using their npm packages

Lit

A self-hosted version of lit-element 2.7.6. It is the lit-all package so directives like ref can be used. Be careful not to import from the npm package which is only installed locally for type checking.

Firebase

A self hosted version of Firebase 9.7.0 for website use and 7.14.6 for use in cloud functions. Be careful not to import from the npm package which is only installed locally for type checking.

Service Worker

A service worker that will cache files as the user visits them. If you are using static imports (or lazy loading, anything that isn't truly dynamic), it will cache your whole website

Services

Helper functions for Firebase Auth and Firestore. Read the documentation for more details.

Global Styles

Some basic CSS resets. Also includes the Material Symbols Sharp font family, available with .material-symbols

Authentication Pages

While not routed, simple signup, login, and forgot password pages are included. They use the Firebase services. Signup and Login support a redirect query parameter to send the user to a specific location after authenticating.

html-template's People

Contributors

fogoplayer avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.