Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Expose helper methods on "init" object for template use.

  • Loading branch information...
commit 4da84f4c29da696ebcbf169e0e2c843f0699bf39 1 parent d294ecc
@cowboy cowboy authored
Showing with 136 additions and 4 deletions.
  1. +134 −2 README.md
  2. +2 −2 tasks/init.js
View
136 README.md
@@ -125,7 +125,139 @@ exports.template = function(grunt, init, done) {
```
## Inside an init template
-_(Documentation coming soon)_
+Until these methods and properties are documented, see the `grunt-init` source for more information:
+
+* <https://github.com/gruntjs/grunt-init/blob/master/tasks/init.js>
+* <https://github.com/gruntjs/grunt-init/blob/master/tasks/lib/helpers.js>
+
+### init.addLicenseFiles
+TODO: explain
+
+### init.availableLicenses
+TODO: explain
+
+### init.copy
+TODO: explain
+
+### init.copyAndProcess
+TODO: explain
+
+### init.defaults
+TODO: explain
+
+### init.destpath
+TODO: explain
+
+### init.expand
+TODO: explain
+
+### init.expandDirs
+TODO: explain
+
+### init.expandFiles
+TODO: explain
+
+### init.filesToCopy
+TODO: explain
+
+### init.getFile
+TODO: explain
+
+### init.getTemplates
+TODO: explain
+
+### init.initSearchDirs
+TODO: explain
+
+### init.process
+TODO: explain
+
+### init.prompt
+TODO: explain
+
+### init.prompts
+TODO: explain
+
+### init.readDefaults
+TODO: explain
+
+### init.renames
+TODO: explain
+
+### init.searchDirs
+TODO: explain
+
+### init.searchDirs
+TODO: explain
+
+### init.searchDirs
+TODO: explain
+
+### init.srcpath
+TODO: explain
+
+### init.userDir
+TODO: explain
+
+### init.writePackageJSON
+TODO: explain
+
## Built-in prompts
-_(Documentation coming soon)_
+
+Until these prompts are documented, see the `grunt-init` source for more information:
+
+* <https://github.com/gruntjs/grunt-init/blob/master/tasks/init.js>
+* <https://github.com/gruntjs/grunt-init/blob/master/tasks/lib/prompt.js>
+
+### author_email
+TODO: explain
+
+### author_name
+TODO: explain
+
+### author_url
+TODO: explain
+
+### bin
+TODO: explain
+
+### bugs
+TODO: explain
+
+### description
+TODO: explain
+
+### grunt_version
+TODO: explain
+
+### homepage
+TODO: explain
+
+### jquery_version
+TODO: explain
+
+### licenses
+TODO: explain
+
+### main
+TODO: explain
+
+### name
+TODO: explain
+
+### node_version
+TODO: explain
+
+### npm_test
+TODO: explain
+
+### repository
+TODO: explain
+
+### title
+TODO: explain
+
+### version
+TODO: explain
+
View
4 tasks/init.js
@@ -273,7 +273,7 @@ module.exports = function(grunt) {
var pathPrefix = name + '/root/';
// Useful init sub-task-specific utilities.
- var init = {
+ var init = grunt.util._.extend(helpers, {
// Expose prompt interface on init object.
process: prompt.process,
prompt: prompt.prompt,
@@ -438,7 +438,7 @@ module.exports = function(grunt) {
throw e;
}
}
- };
+ });
// Make args available as flags.
init.flags = {};
Please sign in to comment.
Something went wrong with that request. Please try again.