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

generator-grunt-supercharged

v0.2.0

Published

A GruntJS generator for Yeoman that creates an optimised GruntJS project inspired by the HTML5rocks article 'Supercharging your Gruntfile'

Downloads

12

Readme

Grunt-Supercharged

A GruntJS generator for Yeoman that creates an optimized GruntJS project inspired by the HTML5rocks article 'Supercharging your Gruntfile'

Usage

$ yo grunt-supercharged

Optimization 1 : autoloading grunt plugins

By using the gruntjs module 'load-grunt-tasks' you don't need to manually load each task which can be cumbersome. This module will read the dependencies in your package.json and load grunt tasks that match the provided patterns.

before

grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-sizediff');
grunt.loadNpmTasks('grunt-svgmin');
grunt.loadNpmTasks('grunt-styl');
grunt.loadNpmTasks('grunt-php');
...

after

require('load-grunt-tasks')(grunt);

Optimization 2 : Splitting configuration in individual files

The module load-grunt-config lets you break up your Gruntfile config by task. Every task has its own javascript file defined in the folder grunt.

folder structure

- myproject/
-- Gruntfile.js
-- grunt/
--- aliases.yaml
--- concat.js
--- uglify.js

grunt/uglify.js

module.exports = {
	dist: {
		files: {
  			'dist/js/build.min.js': ['dist/js/build.js']
		}
	}
};

The module requires an aliasas file (aliases.yaml) where you can register your task

grunt/aliases.yaml

default:
	- 'concat'
	- 'uglify'

Optimization 3 : only process modified files

The module grunt-newer builds a local cache and only execute tasks on files that changed since the last task has runned. This can speedup the build process enormously !

Simply prepend “newer:” to any of your tasks pipes

grunt/aliases.yaml

default:
	- 'newer:concat'
	- 'newer:uglify'
	

Optional modules

You can enable following handy modules through the interactive terminal.

Release notes

  • 0.2.0
    • added grunt-contrib-concat as optional module
    • added grunt-jslint as optional module
    • added grunt-contrib-csslint as optional module
  • 0.1.8
    • updated package versions
    • grunt-contrib-uglify is now optional
    • added grunt-contrib-sass as optional module
    • added grunt-contrib-jshint as optional module
  • 0.1.5 - initial release

License

MIT License