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

backstrap-gruntfile

v0.1.3

Published

a great starter Gruntfile with a complete development workflow

Downloads

4

Readme

gruntfile

A great starter Gruntfile with a complete development workflow.

Installation

Add this Gruntfile.coffee to your projects, either by downloading it or copy-pasting the text. Run the following commands in your terminal to install and save Grunt and the packages used in this Gruntfile. Then use the workflow described below for kickass frontend web development!

# globally install Grunt and CoffeeScript
$ npm install -g grunt-cli coffee-script

# basic grunt tools
$ npm install --save-dev browserify coffeeify grunt load-grunt-tasks time-grunt`

# individual grunt plugins
$ npm install --save-dev grunt-browserify grunt-contrib-clean grunt-contrib-concat grunt-contrib-connect grunt-contrib-copy grunt-contrib-cssmin grunt-contrib-handlebars grunt-contrib-imagemin grunt-contrib-sass grunt-contrib-uglify grunt-contrib-watch grunt-gh-pages grunt-template grunt-usemin`

Workflow

Grunt Targets

  • grunt build: compile sources (Coffee, Sass, templates) from app/ to dist/
  • grunt devgrunt: compile source and launch a development server that watches changes and reloads the browser
  • grunt minify: optimize and obfuscate compiled source files for production (run grunt build first)
  • grunt dist: build and minify source code in dist/, copy production assets, and launch a static production preview server
  • grunt deploy: upload production source to your project's GitHub Page (http://<username>.github.io/<project>)

Common Workflow

Generally, you'll run grunt dev (or simply grunt for convenience) while you develop. This command launches the development server which watches for changes to source files and recompiles and reloads intelligently.

When you're ready to deploy a new version, you'll run grunt dist to test the compiled code. This command launches a preview server so you can interact with the compiled code. It does not watch for changes so any fixes will likely require some more grunt dev. Once you are satisfied with your updates, you can run grunt deploy to upload the contents of the dist/ directory to a GitHub Page.

Technologies

This Grunt workflow comes with an opinionated set of web technologies.

CoffeeScript is "a little language that compiles into JavaScript." It merges the power, flexibility, and portability of JavaScript with the pure joy of developer-friendly scripting languages like Ruby and Python. It augments basic JavaScript syntax with a whitespace-sensitive syntax, Python-style comprehensions, simpler English keywords, and a useful class structure with basic inheritance. You're going to love it.

Browserify lets you require('modules') in the browser just like in Node, and bundles all your dependencies effortlessly. This workflow uses Browserify to perform the CoffeeScript compilation and to bundle all your source files for the client.

Sass is "the most mature, stable, and powerful professional grade CSS extension language in the world." It's a CSS pre-processor (equivalent to LESS or Stylus) with a host of powerful features and an active developer community.

Handlebars is "minimal templating on steroids." It's an incredibly simple languge for writing fast, reusable HTML templates. All your template files will be pre-compiled by Grunt and served to the browser in one simple file.

UglifyJS is a "JavaScript parser/mangler/compressor/beautifier toolkit." With the grunt-contrib-uglify plugin, it's basically a production build tool in a box, performing everything from concatenation to compression to obfuscation for both our JavaScript and our CSS. This ensures that your final compiled project is as small and fast as possible.