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

karma-pierce-reporter

v1.2.1

Published

An alternative interface for coverage reports generated by Istanbul.

Downloads

8

Readme

karma-pierce-reporter

A Karma reporter plugin that watches a coverage report file generated by [Istanbul] using something like [karma-coverage] and feeds it to [Pierce] for browsing.

Installation

npm install --save karma-pierce-reporter

Add the reporter to your karma config (karma.conf.js):

// karma.conf.js

module.exports = function(config) {
  config.set({
    // you can omit the plugin list as karma will load all karma-* plugins in
    // your package.json dependencies automatically
    plugins: [
      "karma-coverage",
      "karma-pierce-reporter"
    ],

    reporters: [ /* "progress", ..., */ "coverage", "pierce" ],

    // In your karma-coverage configuration, make sure you use the "json" 
    // reporter which output we'll feed to Pierce:
    coverageReporter: {
      dir: "coverage",
      subdir: ".",
      reporters: [
        { type: "json", file: "report.json" },
        { type: "text-summary" } // optional, if you want text output as well
      ],
    };

    pierceReporter: {
      // Path to where the output will be generated.
      // 
      // The "dir" is relative to the JSON coverageReporter config dir/subdir
      // config, so in this case the Pierce HTML output will be found at:
      // 
      // "coverage/pierce/index.html"
      dir: "pierce",

      // Number of seconds the plugin is allowed to wait for the JSON coverage
      // report to be generated, in case it wasn't by the time the plugin was
      // run.
      // 
      // This is necessary since we can't chain Karma reporters so the plugin
      // can not tell when karma-coverage is done writing its reports.
      waitSeconds: 5,

      // A string to delimit all (full) file-paths by. This is commonly the 
      // name of the folder that contains your app, or the root folder under
      // which the javascript files reside.
      // 
      // For example, if you have a folder structure like this:
      // 
      //   home
      //     somebody
      //       projects
      //         myapp
      //           package.json
      //           lib
      //             index.js
      //           test
      //             index.test.js
      // 
      // You would specify "myapp" and /home/somebody/projects/myapp will be
      // discarded from the file paths in the UI.
      sourceRoot: null,
      
      // A list of folder names to group the modules by in the UI.
      // An example value of "views/" will group all files under _any_ folder
      // called "views" recursively. So, for a file path like this:
      // 
      //     /views/Users/views/Profile/index.js
      //     
      // The file will be listed under:
      // 
      //   Users
      //     Profile
      //       index.js
      //       
      groupBy: [ "views/" ],

      // If you have specified any groups in the "groupBy" parameter, turning
      // this flag on will keep the group names in the file paths. So, instead
      // of seeing:
      // 
      //   Users
      //     Profile
      //       index.js
      //  
      // You will now see:
      // 
      //   views/Users
      //     views/Profile
      //       index.js
      // 
      // This option is handy when you have multiple groups.
      keepGroupNames: true
    }
  });
};

License

Copyright (c) 2015 Instructure Inc.

The code is licensed under the MIT License, and some parts of are under the BSD-3-Clause.