0.1.0 • Published 11 years ago
grunt-play v0.1.0
grunt-play
Getting Started
This plugin requires Grunt ~0.4.0
npm install grunt-play --save-dev
One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-play');
The "play" task
Overview
In your project's Gruntfile, add a section named play
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
play: {
fanfare: {
file: './sounds/fanfare.mp3'
}
}
})
Usage Examples
Example Gruntfile
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
jshint: {
all: [
'tasks/**/*.js'
],
options: {
jshintrc: '.jshintrc'
}
},
watch: {
scripts: {
files: [
'tasks/**/*.js'
],
tasks: ['jshint', 'play:fanfare']
}
},
play: {
fanfare: {
file: './sounds/fanfare.mp3'
}
}
});
// Actually load this plugin's task(s).
grunt.loadTasks('tasks');
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
// By default, lint and run all tests.
grunt.registerTask('default', ['jshint', 'play']);
};
thanks
i love DQ :)
Release History
2013-03-27 v0.0.1 initial release
0.1.0
11 years ago