Skip to content
Browse files

Update CUSTOMIZING.md

  • Loading branch information...
1 parent 8e347d8 commit d59c33acac17614ba5ebb8d39863a3021765e884 @cgross committed Feb 28, 2014
Showing with 4 additions and 2 deletions.
  1. +4 −2 CUSTOMIZING.md
View
6 CUSTOMIZING.md
@@ -31,7 +31,7 @@ Directory to load filter template files from
#### injector
Type: `String`
-A NodeJS module name (path relative to the `.yo-rc.json`). The module must export one function. That function can extend or override the standard reference injecting logic of the generator (i.e. injecting <script> tags in index.html or injecting @import statements in the app.less). The function takes two arguments: the `filename` of the file that may need injection and a `logger` function that can be used to write output. Return `true` from this function to prevent standard reference injecting logic for the given filename. Otherwise, the standard reference injecting logic will be executed after this function is complete. For example, if you've overriden one or more of the templates for a given sub-generator and included a new `.scss` template, you may need to inject an @import statement into your primary scss file.
+A NodeJS module name (path relative to the `.yo-rc.json`). The module must export one function. That function can extend or override the standard reference injecting logic of the generator (i.e. injecting &lt;script&gt; tags in index.html or injecting @import statements in the app.less). The function takes two arguments: the `filename` of the file that may need injection and a `logger` function that can be used to write output. Return `true` from this function to prevent standard reference injecting logic for the given filename. Otherwise, the standard reference injecting logic will be executed after this function is complete. For example, if you've overriden one or more of the templates for a given sub-generator and included a new `.scss` template, you may need to inject an @import statement into your primary scss file.
## Example Configuration
@@ -53,6 +53,8 @@ Here is an example configuration that matches the default behavior of the sub-ge
}
```
+If a given template property is missing, the default templates will be used.
+
## Template Directories
Each template directory can contain any number of files for a given sub-generator. Each file will be read, run through the template engine, and then saved to the user specified destination. The name of the destination file will be derived from the name of the template file after a word replacement has been done. Each type of sub-generator will replace the sub-generator type word in the name with the user specified component name. In other words, a template file named partial-spec.js, when the user creates a component named my-component, will turn into a destination file named my-component-spec.js.
@@ -64,4 +66,4 @@ All templates are valid underscore templates using the standard ERB-style delimi
* `appname` - name of the Angular app/module name
* `name` - the name of the component entered by the user
* `ctrlname` - (partials only) name of the controller
-* `_` - Underscore.js with Underscore.string mixed in. This allows you to use code like `<%= _.camelize(name) %>` in the templates.
+* `_` - Underscore.js with Underscore.string mixed in. This allows you to use code like `<%= _.camelize(name) %>` in the templates.

0 comments on commit d59c33a

Please sign in to comment.
Something went wrong with that request. Please try again.