grunt-build-include
v2.0.1
Published
Grunt task to replace BUILD_INCLIDE with options statments usng grunt
Downloads
11
Maintainers
Readme
grunt-build-include
Documentation
Extensive documentation can be found here.
The What
This is a plugin for Grunt that allows you to rescursivly include other files into your output by using build_include statements.
Can be a simple include that replaces build_include statement with with the contents of a file.
This plugin is a grunt implementation of the build_include package.
Example:
// BUILD_INCLUDE("./scratch/mysnippet.js")
Can be a more complex replacement that applies formating using Options
Example:
var getStyleCss = function () {
var css = '// BUILD_INCLUDE("./scratch/style.min.css")[asjsstring,breakString?width=80]';
return css;
};
See Example: Asjsstring Include Text In Javascript String
Getting started
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-build-include --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-build-include');
This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended to upgrade.