0.1.0 • Published 9 years ago
grunt-pulse v0.1.0
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.
0.1.0
9 years ago