A small, concurrent Gruntjs runner

About Pint

Pint is a small, asynchronous, dependency aware wrapper around Grunt attempting to solve some of the problems that accompany a build process at scale. A typical Gruntfile starts with, at a minimum, some variation of: jsHint, jasmine, LESS, handlebars, uglify, copy, and clean stack. Just these half dozen or so plugins can balloon your Gruntfile upwards of 300 lines and when you add complex concatenation, cache busting, and versioning can cause it to grow well in to the 1000+ lines. Pint allows you to break up and organize your build into small testable pieces.

The Pint Mission

  • Build should be concurrent by default
  • Build should manage dependencies transparently
  • Build should be well organized
  • Build tasks should be independent from one another

Dependency Aware

Your project's build tasks form a directed acyclic graph which Pint uses, like many other mature build tools, to create a safe build sequence for you.

Concurrent

Because Pint is dependency aware it will safely and transparently parallelize your build by spawning multiple Grunt processes.

Uses Grunt plugins

Pint runs Grunt processes under the hood so you can continue to take advantage of the Grunt plugin ecosystem and can reuse all your existing Grunt config.

Organizes your build

Pint is organized by Jobss helping maintain a proper decoupling and seperation of concerns.

Getting Started

Install Pint


$ npm install -g pint
$ pt --help
						

Add Pint to your project


{
  "name": "my-project-name",
  "version": "0.1.0",
  "devDependencies": {
    "pint": "0.1.0",
    "grunt-contrib-jshint": "0.8.0"
  }
}
						
./package.json

Create a new pint Job

Notice that the config here is exactly what you would put in your Gruntfile.js and the build array is just a list of what would be Grunt tasks.


'use strict';

module.exports = {
  name: 'test',

  dependsOn: [],

  build: [
    'jshint',
  ],

  config: {
    jshint: {
      options: {
        ignores: ['./node_modules/**/*']
      },
      all: ['./**/*.js']
    }
  }
};
						
./build/test.js

Create a Pint file and require in your build files


'use strict';

module.exports = {
  jobs: [
    require('./build/test.js'),
  ]
};
						
./Pintfile.js

Install packages and run Pint


$ npm install
$ pt
						

Get Involved