Grunt homepage | Documentation table of contents
Built-in Helpers ⚑
EXPLAIN
Take a look at the built-in tasks source code for more examples.
Built-in Directives ⚑
Expands to the value of the prop.subprop
config property. This can be any number of objects deep, prop.subprop.otherprop.whatever
is totally valid. Great for DRYing up file lists.
Expand to the object parsed from file.json via grunt.file.parseJSON.
Expand to the string in config property prop.subprop
, parsed via grunt.template.process, using <% %>
delimiters. If the config property isn't specified like <banner>
, defaults to the meta.banner
property.
Expand to the given file, with any leading /*...*/
banner (excluding /*!...*/
comments) stripped. Flags can be passed to instruct which banners to strip. The line
flag (eg. <file_strip_banner:file.js:line>
) will remove a continguous block of leading //
line comments, while the block
flag (eg. <file_strip_banner:file.js:block>
) will strip all block comments.
Expand to the given file, parsed as a template via grunt.template.process, using <% %>
delimiters.
Take a look at the api documentation and example gruntfiles for directive creation and usage examples.