Pint.js

I'd really love a good right now...

Buildfile

jobsbuildfile.jobs
Set the jobs to be run into the buildfile

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

Jobs

namejob.name
Set the name property on a job. The name can be used to reference a job in dependency lists.

module.exports = {
  name: 'JavaScript'
};

dependsOnjob.dependsOn
Set an array of dependencies for a job. The job will not run until after the dependencies are completed. This feature relies on dependencies being a Directed Acyclic Graph. Circular dependencies are not checked for!

// This job will not execute until both test and handlebars jobs are completed

module.exports = {
  name: 'JavaScript',
  dependsOn: [
    'test',
    'handlebars'
  ]
};

buildjob.build
Set an array of Grunt.js tasks to execute during the build phase. All tasks for a job are configured in the job.config property.

module.exports = {
  name: 'Lint',
  build: [
    'jshint'
  ],

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

configjob.config
Set the configuration of Grunt.js tasks. Grunt.js is a plugin based tool. The example below is based on jsHint Visit the individual plugin websites for more examples.

Note: You do not have to load tasks withgrunt.loadNpmTasks('task-name'); This is done automatically based on the package.json file

module.exports = {
  name: 'Lint',
  build: [
    'jshint'
  ],

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

initializejob.initialize()
Set a function to be executed immediately before the job

module.exports = {
  name: 'Lint',
  initialize: function () {
    console.log('I am an initializer')
  }
};

finalizejob.finalize()
Set a function to be executed immediately after the job

module.exports = {
  name: 'Lint',
  finalize: function () {
    console.log('I am a finalizer')
  }
};