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 🙏

© 2026 – Pkg Stats / Ryan Hefner

grunt-dapper

v0.1.6

Published

Rollups + Dependency Management

Readme

Dapper

Dapper is an asset compression and dependency management tool. It allows you to declare "lists" of assets that can be combined, and minified to reduce the number of HTTP requests your app has to make. Then when they are loaded dependencies are resolved.

The reason it does both compression and dependencies is because it automatically writes code to manage dependencies. This was born out of a need to retrofit compression and dependency management into an existing project. When you start compressing things into files, order of inclusion in the compressed file becomes extremely important... unless you have dependency management take care of that for you.

Dapper works well for getting your project from including multiple script/style files on a page to a much smaller number of files very quickly. It was born out of a need to retrofit a project to do just that.

Install

npm install grunt-dapper

Usage

Dapper has 3 parts:

  1. grunt config
  2. rollups
  3. your js files

1. Grunt

An example Grunt config:

grunt.initConfig({
    dapper: {
        dist: {
            src: "example/assets/",
            dest: "example/public/",
            minify: true
        }
    }
});

grunt.loadNpmTask('grunt-dapper');

/**
 * Example tasks
 */
grunt.registerTask('build', ['dapper']);
grunt.registerTask('quick', function() {
    grunt.config.set('dapper.dist.minify', false);
    grunt.task.run('dapper');
});

Options

src (required)

Type: string Default: null

the location of the three directories: css/, js/ and rollup/

dest (required)

Type: string Default: null

where you would like the output sent. directory structure from the rollup/ directory is preserved.

minify

Type: boolean Default: true

wether or not to run cssmin or uglify-js on the output.

2. Rollups

A json list of files you want included in a similarly named css or js file. See example/assets/rollup/ directory. A rollup will look like this:

{
    "files": [
        "index/index",
        "lib/somelib"
    ]
}

The name and location of the output file is determined by the name and location of the rollup file relative to the dest option in the grunt config.

The type of output is determined by what directory inside rollup/ it's in. Either rollup/js/ or rollup/css/. You do not need to include the filetype in the list.

2. Javascript Dependencies (your js files)

All you need to do to your existing javascript files is add lines at the top declaring which other js files it depends on.

Say you have a file at js/index/index.js that uses bits from two other libraries located in other files. The top of js/index/index.js would look like this:

// @@require js/lib/mylib
// @@require js/common/otherlib

var Index = function() {
...

js/index/index.js would then wait until the other two libs have been loaded until it ran. This allows arbitrary listing in rollups without you having to worry about what order everything is included on the page.