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

modelo-article-list

v1.0.1

Published

bundled and tested es6 module development and distribution boilerplate for the web/html/browser

Downloads

2

Readme

es6-module-boilerplate-browser

This Boilerplate helps to create bundled and tested, es6-transpiled front-end modules for the Browser.

Features

  • bundled using browserify
  • es6 with babelify transform (includes sourcemaps for development)
  • unit testing, using your browser, mocha & chai
  • in-browser coverage information powered by Blanket.JS
  • includes hbsfy transform to pre-compile Handlebars templates and allow just requiring them

Batteries included

  • sinon for API endpoint mocking etc.
  • jQuery
  • Underscore
  • Backbone
  • Marionette

How to get started

$ git clone https://github.com/elgubenis/es6-module-boilerplate-browser
$ cd es6-module-boilerplate-browser/
$ npm install
$ gulp

To start developing, modify the source in src/ or modify the tests in test/spec/ and your browser should reload automatically and run the tests and show coverage information. When the coverage is 90%, minified and original distribution files are getting created in the dist/ folder.

FAQ

How can I add more specs?

Create another .js file in the test/spec folder and require it on the
bottom of the server/index.html file.

How do distribution files getting created?

After every mocha run in your browser, the blanket.js coverage percentage is
being parsed and when the coverage is over 89%, only then the gulp build task
will get started. That task creates a minified and an original version
of the bundled src/index.js script and moves it to the the dist/ folder/.

Ready for publish!

Where can I configure the coverage and failure thresholds, so my module gets built even if it doesnt comply with the recommended settings? (90% coverage, 0 failures)

You can change these settings in the gulpfile.js (gulp restart required)
const LOWEST_BUILD_THRESHOLD = 90; // default, this is the % of coverage needed for building
const LOWEST_BUILD_FAILURES = 0; // default, this is the number of failures allowed for building

What are the benefits from running unit tests in a Browser?

Doing unit tests with JSDom or PhantomJS overcomplicates things alot, you'd
also have to take care of more files and code to get up and running.

By opening tests in a real Browser though, you can just pretend you are
someone who wants to use the module and implement it just like documented.

And finally, you can use the same Browser to evaluate your front-end
modules visual aspects directly while developing, without having an extra step for that.