Giter Site home page Giter Site logo

luixaviles / litelement-website Goto Github PK

View Code? Open in Web Editor NEW
75.0 3.0 19.0 653 KB

A Single Page Application(SPA) based on Web Components using LitElement and TypeScript

License: MIT License

JavaScript 15.61% HTML 2.17% TypeScript 82.22%
lit-element web-components typescript single-page-app rollup spa

litelement-website's Introduction

LitElement Website

A Single Page Application(SPA) based on Web Components using LitElement, Vaadin Router for navigation and TypeScript.

Quickstart

To get started, install dependencies:

npm install

Start the preview of the app:

npm run start

This will open your default browser with the App.

Scripts

  • start runs your app for development, reloading on file changes
  • start:build runs your app after it has been built using the build command
  • build builds your app and outputs it in your dist directory
  • test runs your test suite with Karma
  • lint runs the linter for your project

Running Cypress - E2E Testing

First, make sure you're running the application

npm run start

Then, open a separate terminal to run the E2E tests

npm run cypress:open

Or

npm run cypress:run

litelement-website's People

Contributors

luixaviles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

litelement-website's Issues

Cannot find name 'cy'

I've cloned the repo and followed the instructions, but for any command that I try to run I get an error similar to

cypress/integration/about.spec.ts(4,5): error TS2304: Cannot find name 'cy'.

missing deep-linking so page refreshes and Admin example don't work

Very nice series of articles and it's good to see that you're following the open-wc scaffolding including the web-dev-server but the example you give for an admin page won't work as there doesn't seem to be any redirections of requests going to the app entry point (index.html).

This also means that a user cannot refresh one of the application routes in the browser (i.e. a blog post) as this will result in a 404 error.

Edit:

There's been a change in the development web server from es-dev-server to @web/dev-server since you wrote this article. To get your code running with the modern open-wc scaffold you need to edit your package.json from

"start": "concurrently --kill-others --names tsc,es-dev-server \"npm run tsc:watch\" \"es-dev-server --app-index index.html --node-resolve --open --watch\"",

to

"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds --app-index index.html\""

because the --app-index index.htm is no longer added by default.

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.