node package manager


Include script files individually for debugging.


Include script files individually for debugging. An alternative to source maps, especially useful for browsers that don't support them.

This plugin requires Grunt ~0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-script-include --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:


This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that you upgrade, but in case you can't please use v0.3.2.

Run this task with the grunt include command.

Task targets, files and options may be specified according to the grunt Configuring tasks guide.

Type: String

This option is a required option which specifies the full path to create your <script> tags in.

Type: String

This option specifies any space separated attributes to use on your <script> tags. Defaults to ''.

include: {
    dev: {
        options: {
            include: 'build/include/scripts.html'
        files: [{
            expand: true,
            cwd: 'src/scripts',
            src: ['vendor/**/*.js', 'app/**/*.js'],
            dest: 'build/js/src/'

This task supports all the file mapping format Grunt supports. Please read [Globbing patterns][] and [Building the files object dynamically][] for additional details.

If the files do not exist in the destination specified they will be copied there. The root is automatically calculated based on the include option and files.dest.

  • 2013-08-08 v0.0.1 Initial release