GithubHelp home page GithubHelp logo

zachleat / speedlify-score Goto Github PK

View Code? Open in Web Editor NEW
42.0 3.0 3.0 35 KB

A web component that shows Lighthouse scores via Speedlify.

Home Page: https://www.speedlify.dev/

HTML 38.82% JavaScript 61.18%
speedlify web-components

speedlify-score's Introduction

speedlify-score Web Component

Demo

Usage

Installation

npm install speedlify-score

Include Sources

Include speedlify-score.js in your page (preferably concatenated in via a build script).

Use Markup

Use <speedlify-score> in your markup.

Required attributes:

  • speedlify-url: Required. The URL to your Speedlify instance.
  • hash: Preferred but technically optional. A hash representing the active URL.
  • url: Optional. Not used if hash is supplied. This is the raw URL of the page you’d like to see the score for. Defaults to the current page.

Examples

<!-- Preferred -->
<speedlify-score speedlify-url="https://www.speedlify.dev/" hash="bbfa43c1">
<!-- Slower method, but doesn’t require hash -->
<speedlify-score speedlify-url="https://www.speedlify.dev/" url="https://www.11ty.dev/">

Use Attributes to customize output

  • If no attributes are used, it score is implicit and default.
  • If some attributes are in play, you must explicitly add score.
  • requests
  • weight
  • rank
  • rank-change (difference between old and new rank)

Changelog

  • v1.0.0: First release
  • v2.0.0: Changes default render behavior (only shows Lighthouse scores by default, summary and weight are not). Adds feature to use attributes to customize output if you want to opt-in to more.
  • v3.0.0: Removes flex-wrap: wrap for top level component.
  • v4.0.0: Using Shadow DOM, removes need for external stylesheet.

speedlify-score's People

Contributors

zachleat 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

Watchers

 avatar  avatar  avatar

speedlify-score's Issues

Display on Github Readme

Loving Speedlify, @zachleat. I was wondering if there was a way to integrate this into a Github Readme similar to Netlify build status (like the success badge on the main Speedlify repo).

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.