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

broccoli-inspector

v0.5.0

Published

πŸ” inspect what's really happening in your broccoli pipeline

Downloads

12

Readme

broccoli-inspector

πŸ” inspect what's really happening in your broccoli pipeline

there be 🐲 here! The API's and functionality are still be cemented, anything before a 1.0.0 release will be subject to change.

demo-screencast

Installation

yarn add broccoli-inspector --dev

Usage

Currently the middleware is made to work with ember's built in server middleware functionality. The end goal for this project is that this will be built into broccoli directly and will be available out of the box when using broccoli in your projects.

If you are using this to profile and debug an Ember applications build, please add this to the following places.

// server/index.js

module.exports = function (app, info) {
  require('broccoli-inspector/lib/middleware')(app, info);
};

To get FS timing information ensure that you add EMBER_CLI_INSTRUMENTATION=1 running ember serve.

Currently tracking moving this functionality into broccoli here https://github.com/broccolijs/broccoli/issues/461.

Once you have done the setup done, visit http://localhost:4200/_broccoli-inspector in your browser.

How does this work?

We are leveraging functionality that currently exists in the broccoli nodes themselves. We are using Ember as our UI as we can debug this application with itself!

Ember exposes the broccoli watcher in a middleware through server/index.js, since we are exporting a middleware of our own that takes in an express application and the broccoli builder we are utilizing functionality that exists!

Broccoli inspector consists of three distinct parts:

  1. A middleware (this can be used wherever there is a running express server and broccoli builder present)
  2. Broccoli (we are leveraging information broccoli has in it's builder)
  3. Heimdall (since Heimdall is used as a core logger for broccoli we can leverage it's information such as timing and fs data)

How do I continue debugging?

As broccoli inspector is meant to give a high level understanding of what is happening in the build. Once you are able to track down a plugin that is potentially worth exploring further, using the data you find and creating benchmarking test cases for that plugin and utilizing nodejs debugging flamegraphs https://nodejs.org/en/docs/guides/diagnostics-flamegraph/ will help bring a better level of understanding to what code paths are causing issues.