Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
play sound with grunt
JavaScript
branch: master
Failed to load latest commit information.
sounds Initial commit.
tasks Initial commit.
.jshintrc Initial commit.
Gruntfile.js Initial commit.
README.md modified README.
package.json Initial commit.

README.md

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

Something went wrong with that request. Please try again.