Skip to content

Commit

Permalink
More docs formatting fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
shama committed Aug 30, 2013
1 parent fe2308d commit a54ab42
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 31 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# grunt-contrib-handlebars [![Build Status](https://travis-ci.org/gruntjs/grunt-contrib-handlebars.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-handlebars)
# grunt-contrib-handlebars v0.5.10 [![Build Status](https://travis-ci.org/gruntjs/grunt-contrib-handlebars.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-handlebars)

> Precompile Handlebars templates to JST file.
Expand Down Expand Up @@ -30,14 +30,14 @@ Task targets, files and options may be specified according to the grunt [Configu
### Options

#### separator
Type: `String`
Default: linefeed + linefeed
Type: `String`
Default: `linefeed + linefeed`

Concatenated files will be joined on this string.

#### namespace
Type: `String` `false`
Default: 'JST'
Type: `String` `false`
Default: `'JST'`

The namespace in which the precompiled templates will be assigned. *Use dot notation (e.g. App.Templates) for nested namespaces or false for no namespace wrapping.* When false with `amd` option set `true`, templates will be returned directly from the AMD wrapper.

Expand All @@ -49,28 +49,28 @@ options: {
```

#### partialsUseNamespace
Type: `Boolean`
Type: `Boolean`
Default: `false`

When set to `true`, partials will be registered in the `namespace` in addition to templates.

#### wrapped
Type: `Boolean`
Type: `Boolean`
Default: `true`

Determine if preprocessed template functions will be wrapped in Handlebars.template function.

#### node
Type: `Boolean`
Type: `Boolean`
Default: `false`

Enable the compiled file to be required on node.js by preppending and appending proper declarations. You can use the file safely on the front-end.

For this option to work you need to define the `namespace` option.

#### amd
Type: `Boolean`
default: `false`
Type: `Boolean`
Default: `false`

Wraps the output file with an AMD define function and returns the compiled template namespace unless namespace has been explicitly set to false in which case the template function will be returned directly.

Expand All @@ -82,8 +82,8 @@ define(function() {
```

#### commonjs
Type: `Boolean`
default: `false`
Type: `Boolean`
Default: `false`

Wraps the output file in a CommonJS module function, exporting the compiled templates. It will also add templates to the template namespace, unless `namepsace` is explicitly set to `false`.

Expand Down Expand Up @@ -165,7 +165,7 @@ options: {
Note: If processPartialName is not provided as an option the default assumes that partials will be stored by stripping trailing underscore characters and filename extensions. For example, the path *templates/_header.hbs* will become *header* and can be referenced in other templates as *{{> header}}*.

#### partialRegex
Type: `Regexp`
Type: `Regexp`
Default: `/^_/`

This option accepts a regex that defines the prefix character that is used to identify Handlebars partial files.
Expand All @@ -178,7 +178,7 @@ options: {
```

#### partialsPathRegex
Type: `Regexp`
Type: `Regexp`
Default: `/./`

This option accepts a regex that defines the path to a directory of Handlebars partials files. The example below shows how to mark every file in a specific directory as a partial.
Expand All @@ -191,7 +191,7 @@ options: {
```

#### compilerOptions
Type `Object`
Type `Object`
Default: `{}`

This option allows you to specify a hash of options which will be passed directly to the Handlebars compiler.
Expand Down Expand Up @@ -252,4 +252,4 @@ handlebars: {

Task submitted by [Tim Branyen](http://tbranyen.com)

*This file was generated on Fri Aug 30 2013 08:58:17.*
*This file was generated on Fri Aug 30 2013 09:01:48.*
28 changes: 14 additions & 14 deletions docs/handlebars-options.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Options

## separator
Type: `String`
Default: linefeed + linefeed
Type: `String`
Default: `linefeed + linefeed`

Concatenated files will be joined on this string.

## namespace
Type: `String` `false`
Default: 'JST'
Type: `String` `false`
Default: `'JST'`

The namespace in which the precompiled templates will be assigned. *Use dot notation (e.g. App.Templates) for nested namespaces or false for no namespace wrapping.* When false with `amd` option set `true`, templates will be returned directly from the AMD wrapper.

Expand All @@ -20,28 +20,28 @@ options: {
```

## partialsUseNamespace
Type: `Boolean`
Type: `Boolean`
Default: `false`

When set to `true`, partials will be registered in the `namespace` in addition to templates.

## wrapped
Type: `Boolean`
Type: `Boolean`
Default: `true`

Determine if preprocessed template functions will be wrapped in Handlebars.template function.

## node
Type: `Boolean`
Type: `Boolean`
Default: `false`

Enable the compiled file to be required on node.js by preppending and appending proper declarations. You can use the file safely on the front-end.

For this option to work you need to define the `namespace` option.

## amd
Type: `Boolean`
default: `false`
Type: `Boolean`
Default: `false`

Wraps the output file with an AMD define function and returns the compiled template namespace unless namespace has been explicitly set to false in which case the template function will be returned directly.

Expand All @@ -53,8 +53,8 @@ define(function() {
```

## commonjs
Type: `Boolean`
default: `false`
Type: `Boolean`
Default: `false`

Wraps the output file in a CommonJS module function, exporting the compiled templates. It will also add templates to the template namespace, unless `namepsace` is explicitly set to `false`.

Expand Down Expand Up @@ -136,7 +136,7 @@ options: {
Note: If processPartialName is not provided as an option the default assumes that partials will be stored by stripping trailing underscore characters and filename extensions. For example, the path *templates/_header.hbs* will become *header* and can be referenced in other templates as *{{> header}}*.

## partialRegex
Type: `Regexp`
Type: `Regexp`
Default: `/^_/`

This option accepts a regex that defines the prefix character that is used to identify Handlebars partial files.
Expand All @@ -149,7 +149,7 @@ options: {
```

## partialsPathRegex
Type: `Regexp`
Type: `Regexp`
Default: `/./`

This option accepts a regex that defines the path to a directory of Handlebars partials files. The example below shows how to mark every file in a specific directory as a partial.
Expand All @@ -162,7 +162,7 @@ options: {
```

## compilerOptions
Type `Object`
Type `Object`
Default: `{}`

This option allows you to specify a hash of options which will be passed directly to the Handlebars compiler.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"grunt-contrib-jshint": "~0.6.0",
"grunt-contrib-nodeunit": "~0.1.2",
"grunt-contrib-clean": "~0.4.0",
"grunt-contrib-internal": "~0.4.2"
"grunt-contrib-internal": "~0.4.6"
},
"peerDependencies": {
"grunt": "~0.4.0"
Expand Down

0 comments on commit a54ab42

Please sign in to comment.