Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: legacy/grunt-0…
Fetching contributors…

Cannot retrieve contributors at this time

48 lines (34 sloc) 1.116 kb

grunt-wrap

Wraps text files

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-wrap

Then add this line to your project's grunt.js gruntfile:

grunt.loadNpmTasks('grunt-wrap');

Documentation

Configure which files to be copied in your initConfig:

grunt.initConfig({

  // ... other configs

  // wrap my modules with define
  wrap: {
    modules: {
      src: ['assets/*.js'],
      dest: 'dist/',
      wrapper: ['define(function (require, exports, module) {\n', '\n});']
    }
  },

  // ... other configs
});

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Release History

  • 2012 Oct 4 - v0.1.0 - Initial release.

License

Copyright (c) 2012 Christopher Rogers Licensed under the MIT license.

Jump to Line
Something went wrong with that request. Please try again.