-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add trivial AMD module dependency management.
This allows to define global module dependencies, which will be added to the `define` method. The default value '{ hc: 'hamlcoffee' }' will add the following to the module definition: define ['hamlcoffee'], (hc) -> When the template contains a require call in the form of - require 'module' - require 'deep/nested/other' it will be added to the module definition list define ['hamlcoffee', 'module', 'deep/nested/other'], (hc, module, other) -> allowing you to render a partial template: != module() != other() Of course the require call can have different quotes or parenthesises, allowing you to directly require and render: != require("another/other")()
- Loading branch information
Showing
4 changed files
with
122 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters