grunt-gazer
v0.1.0
Published
Stop building & testing your whole project when only one file changed...
Downloads
1
Readme
grunt-pulse v0.1.0
What is this?
A plugin for Grunt that...
Table of Contents
Installation
In your terminal:
npm install --save-dev grunt-pulse
In your Gruntfile.js
:
grunt.loadNpmTasks("grunt-pulse")
But I suggest using load-grunt-tasks
:
require("load-grunt-tasks")(grunt) // loads every installed "grunt-*" module
Example
In the example below, the anonymous task runs after clean
completes and before build
starts.
grunt.config.merge({
pulse: {
src: ["src"],
dest: ["dest"],
ext: "coffee",
build: function (files) {
// See the 'Options' section for info on what to do here.
grunt.task.then("webpack", {
entry: files.reduce(function (entry, file, i) {
entry[file] = file
}, {})
})
},
test: function (files) {
// See the 'Options' section for info on what to do here.
grunt.task.then("karma", {
files: files.reduce(function (files, file, i) {
files.push({
pattern: file
})
}, []),
autoWatch: false
})
},
test: function (files) {}
}
})
The this
variable in anonymous tasks is the same as in registered tasks.