concordusapps / grunt-haml

Process HAML templates to precompiled JavaScript or rendered HTML.
https://npmjs.org/package/grunt-haml
MIT License
41 stars 28 forks source link

Improve documentation - use with AMD #29

Closed guigrpa closed 9 years ago

guigrpa commented 10 years ago

In the documentation of this Grunt task, maybe it could be clarified that AMD dependencies can be added in two ways:

  1. Including them in the Gruntfile, when they are used by all HAML templates
  2. Including them in the particular template, when they are specific

In addition, the current documentation suggests adding the following line to express a dependency: != require('path/to/other')() (option 2 above). This assumes that the value of the module is a function and that we want to call it. In general, though, the value of the module may be a simple object or even a function that we don't want to call. I would suggest to modify the documentation as follows: != require('path/to/other').