Coder Social home page Coder Social logo

start-lit-element

A simple Hello World for LitElement.

https://start-lit-element.firebaseapp.com/

Quick start

npm install -g polymer-cli
git clone https://github.com/PolymerLabs/start-lit-element
cd start-lit-element
npm install
polymer serve

Detailed setup info

Clone this repo

git clone https://github.com/PolymerLabs/start-lit-element

Start a dev server

npm install -g polymer-cli
cd start-lit-element
npm install
polymer serve

Set up new app

  1. In index.html, update metadata stuff:
<!-- Change stuff here for your app -->
<meta name="description" content="start-lit-element">
<meta name="theme-color" content="#ffffff">
<title>start-lit-element</title>
  1. In index.html, uncomment the service worker registration code:
<!-- Register service worker if supported. -->
<!--
<script>
  if ('serviceWorker' in navigator) {
    navigator.serviceWorker.register('/service-worker.js');
  }
</script> -->
  1. In manifest.json, update the app description, etc:
"description": "start-lit-element",
"start_url": "index.html",
"name": "start-lit-element",
"short_name": "start-lit-el",
"background_color": "#ffffff",
"theme_color":"#ffffff",
  1. Update your package.json if required

  2. In polymer.json, update your shell & entrypoint if required

"shell": "src/start-lit-element.js",
"entrypoint": "index.html",
  1. Remember to update firebase.json and .firebaserc for a real deployment!

Build for production and serve locally

Build your project and serve the build locally:

polymer build
polymer serve build/default

If you changed significant stuff (e.g. filenames, folder structure, installed other modules, etc), edit your polymer.json file to configure your build correctly. See the Polymer CLI documentation for more info.

Deploy

  1. Set up Firebase CLI tools.

  2. Create a new Firebase project.

  3. Update firebase.json and .firebaserc with your own app details.

  4. Deploy.

    firebase deploy
    

See the Firebase CLI Reference for more info.

Browser compatibility and performance

At the time of writing (Dec 11 2018) this app was scoring 100% on all Lighthouse audits when deployed, and was working fine on the most recent versions of Chrome, Safari, Firefox, and Edge.

Let me know of any issues.

Known issues

(All browsers) Dynamic import warning:

Could not resolve module specifier "require" in file "..src/start-lit-element.js".

See Polymer/tools#131.

(IE11 and Edge) Warning due to <!--! in built HTML:

Unexpected character: U+0021 EXCLAMATION MARK (!)
Unexpected character in comment end. Expected "-->"

See https://github.com/Polymer/polymer-cli/issues/779.

Joe Boylson's Projects

Joe Boylson doesnโ€™t have any public repositories yet.

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.