npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

web-components-inspector

v0.0.2

Published

Web Components Inspector (supports Polymer)

Downloads

10

Readme

Web Components Inspector (supports Polymer)

This tool gets inspiration from existing tools like component-inspector and similar ones for Vue (vue-devtools), React (react-devtools), Angular (augury), etc... For now it is more a PoC that such a tool can be developed for Custom Elements and ShadowDOM (and friends) to provide a tree of Web Components with the ability to navigate between nodes. UX needs to be improved a lot, lots of features are still to be done, but in certain cases you can play and benefit from it right now. Stay tuned!

Overview

Usage

Cross-browser

  1. Install CLI:

    npm install -g web-components-inspector
  2. In terminal run CLI in you project root to start the server:

    cd path/to/my/project
    wci         # run server on a default port 9247
    wci -e code # with open-in-editor feature (VSCode)
    wci --help  # look at all available options
  3. Create "WCI" bookmarklet in your browser:

    javascript:(function() {
      var s = document.createElement('script');
      s.src = 'http://127.0.0.1:9247/publisher.js';
      s.onload = function() {
        s.remove();
        var m = document.createElement('meta');
        m.name = 'wci:inpage-host';
        document.head.appendChild(m);
      };
      document.head.appendChild(s);
    })();
  4. Open page with Web Components (for example Shop app) and click on the bookmarklet to load and activate the inspector.

  5. Start inspecting :telescope:

Cross-browser usage

Chrome Extension

  1. Install Rempl extension, a platform that will host Web Components Inspector in the Chrome DevTools panel. For more information about it visit Rempl GitHub repository.

  2. Install Web Components Inspector extension.

  3. Open page with Web Components (for example Shop app) and activate DevTools => Rempl panel.

  4. To activate open-in-editor feature, you still need to run a server. You can either use the CLI (see cross-browser usage, steps 1-2), or use a server specifically created for this feature (on port 9247 which the extension expects):

    npm install -g open-in-editor-server
    cd path/to/my/project
    open-in-editor-serve -e code -p 9247 # run server on a port 9247 and open files in VSCode
    open-in-editor-serve --help  # look at all available options
  5. Start inspecting :telescope:

Chrome extension usage