Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated documentation, inconsistencies in readme

  • Loading branch information...
commit 522ccb5590e3a6abcc4e110e76c8cbc7fd7e0c1f 1 parent 2bb8a35
@jonschlinkert jonschlinkert authored
View
4 .gitignore
@@ -14,4 +14,6 @@ logs
!/test/
/tmp/
/temp/
-/docs/
+
+*.sublime-project
+*.sublime-workspace
View
133 README.md
@@ -1,4 +1,4 @@
-# [Assemble v0.3.14](http://github.com/assemble/assemble) [![Build Status](https://travis-ci.org/assemble/assemble.png)](https://travis-ci.org/assemble/assemble)
+# [Assemble v0.3.2](http://github.com/assemble/assemble) [![Build Status](https://travis-ci.org/assemble/assemble.png)](https://travis-ci.org/assemble/assemble)
> Get the rocks out of your socks. Assemble helps you **quickly launch static web projects** by emphasizing a strong separation of concerns between structure, style, content and configuration.
@@ -6,7 +6,7 @@ _This project just launched **so expect frequent changes**._ And if you find thi
### Getting Help
-Assemble has man more features implemented than what we've documented thus far, so check back frequently for udates. If you have any questions or have any trouble getting Assemble to work, please feel free to create an [Issue][issues], we'd love to help._
+Assemble has many more features implemented than what we've documented thus far, so check back frequently for udates. _If you have any questions or have any trouble getting Assemble to work, please feel free to create an [Issue][issues], we'd love to help._
#### [Please visit the wiki](http://github.com/assemble/assemble/wiki)
@@ -42,6 +42,7 @@ Assemble has man more features implemented than what we've documented thus far,
+
## Quick start
This plugin requires Grunt `~0.4.1`
@@ -69,7 +70,7 @@ The following quick start alternatives are available:
### Compile Templates and Run Tests
-`assemble` provides convenient methods for building and running tests. Before you get started you must first install [the required local dependencies](package.json):
+Before you get started you must first install [the required local dependencies](package.json):
```
$ npm install
@@ -78,7 +79,7 @@ $ npm install
When completed, you'll be able to run the various `grunt` commands provided:
#### build - `grunt assemble`
-Runs the `assemble` task to rebuild the project. .
+Runs the `assemble` task to rebuild the project.
#### test - `grunt test`
Runs jshint on JavaScripts and mocha unit tests on your templates.
@@ -115,7 +116,7 @@ Task targets, files and options may be specified according to the grunt [Configu
## Options
See the [Options](https://github.com/assemble/assemble/wiki/Options) section on the Wiki for more information.
-#### options.assets
+#### assets
Type: `String`
Default: `false`
@@ -144,23 +145,22 @@ Resulting in:
<link href="dist/assets/css/styles.css" rel="stylesheet">
```
-#### options.data
+#### data
Type: `String`
Default: `src/data`
-Add the `data` object to the options on the assemble task, then data from any specified `JSON` and/or `YAML` files will get passed through to the context in your templates. The data object is also useful for adding [configuration][config] data. _Note that Handlebars.js is the only supported template engine at this time_. If you would like to see another engine added to Assemble, please make a [feature request][issues] (or pull request).
+Data from specified `JSON` and/or `YAML` files gets passed through the `data` object to the options on the assemble task, then to the context in your templates. The data object is also useful for adding [configuration][config] data. _Note that Handlebars.js is the only supported template engine at this time_. If you would like to see another engine added to Assemble, please make a [feature request][issues] (or pull request).
Example:
-
``` js
assemble: {
options: {
- data: ['src/data/*.json', 'config/global.json']
+ data: ['src/data/*.{json,yml,yaml}', 'config/global.json', 'styles/bootstrap.json']
},
...
}
```
-Example `widget.json` data:
+Data: `widget.json`
``` json
{
"name": "Square Widget",
@@ -168,7 +168,7 @@ Example `widget.json` data:
}
```
-Example `widget.hbs` template:
+Template: `widget.hbs`
``` html
<div class="widget {{ widget.modifier }}">{{ widget.name }}</div>
```
@@ -177,10 +177,10 @@ Compiled result after running `grunt assemble`:
``` html
<div class="widget widget-square">Square Widget</div>
```
-Also see: [YAML front matter] todo...
+Also see: [YAML front matter][yaml] todo...
-#### options.layout
+#### layout
Type: `String`
Default: `undefined`
@@ -197,7 +197,7 @@ assemble: {
}
```
-#### options.partials
+#### partials
Type: `String`
Default: `undefined`
@@ -214,7 +214,7 @@ assemble: {
}
```
-#### options.engine
+#### engine
Type: `String`
Default: `handlebars`
@@ -222,30 +222,22 @@ The engine to use for processing client-side templates. Assemble ships Handlebar
Pull requests are welcome for additional template engines. Since we're still working to update the docs, you many also contact [@doowb](http://github.com/doowb) for more information or create an [Issue][assemble-issues].
-#### options.helpers
+#### helpers
Type: `String`
Default: `undefined`
-Path defined to a directory of helpers to use with the specified template engine.
+Path defined to a directory of custom helpers to use with the specified template engine. Assemble currently includes more than **[75 built-in Handlebars helpers](https://github.com/assemble/helper-lib)**, since Handlebars is the default engine for Assemble.
``` js
assemble: {
options: {
- helpers: 'assemble-helpers-handlebars'
+ helpers: 'your/custom/helpers'
},
...
}
```
-Handlebars, Assemble's default template engine, includes the following built-in helpers: `{{#each}}`, `{{#if}}`, and `{{#unless}}`.
-
-[helper-lib][helper-lib] adds approximately **75 additional helpers**. To include them, follow these instructions:
- * Run: `npm install assemble-helpers-handlebars`
- * Add `assemble-helpers-handlebars` to the `options.helpers` property
- * To learn more visit the [assemble-helpers-handlebars][assemble-helpers-handlebars] repo.
- * See the list of [handlebars helpers][helpers-docs] here.
-
-#### options.ext
+#### ext
Type: `String`
Default: `.html`
@@ -276,34 +268,29 @@ assemble: {
}
```
-
-
-
-#### options.flatten
+#### flatten
Type: `Boolean`
Default: `false`
Remove anything after (and including) the first "." in the destination path, then append this value.
-
-
### YAML options
Assemble makes the following options available from `js-yaml`. See [js-yaml](https://github.com/nodeca/js-yaml) for more information.
-#### options.filename
+#### filename
Type: `String`
Default: `null`
String to be used as a file path in error/warning messages.
-#### options.strict
+#### strict
Type: `Boolean`
Default: `false`
Makes the loader to throw errors instead of warnings.
-#### options.schema
+#### schema
Type: `String`
Default: `DEFAULT_SCHEMA`
@@ -330,8 +317,12 @@ assemble {
```
In your templates just wrap sections with these contexts to include or exclude content based on current working environment.
``` hbs
-
-
+{{#development}}
+<script src="script.js"></script>
+{{/development}}
+{{#production}}
+<script src="script.min.js"></script>
+{{/production}}
```
## Usage Examples
@@ -350,7 +341,7 @@ Assemble gives you the flexibility to:
_Read more about markdown features and `options` in the [markdown documentation][markdown]._
-### Includes and Partials
+### "Include" extenal content
Use the markdown expression, `{{md}}`, to enable importing of external markdown content.
**Example #1: using full path**
@@ -391,7 +382,7 @@ Example:
* even links look prettier
### Pretty links
-[Visit Assemble](http://github.com/assemble/assemble)
+[Visit Assemble](https://github.com/assemble/assemble)
### Even Prettier links
Embed handlebars templates to make them even prettier.
@@ -406,7 +397,7 @@ Embed handlebars templates to make them even prettier.
---
### Task defaults
-Task targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.
+Task targets, files and options may be specified according to the grunt [Configuring tasks](https://github.com/assemble/assemble/wiki/Task-and-Targets) guide.
#### Build templates
@@ -558,13 +549,11 @@ And the same configuration writtin in JSON (`grid.json`) instead:
If you're satisfied with the default `src` and `dest` paths in the `assemble`, simply run `grunt assemble` to compile the grid to static HTML. Or run `grunt watch` to continuously watch files and automatically re-build when changes occur.
-
## Contributing
Want to help make **assemble** even better? All constructive feedback and contributions are welcome, so please consider contributing! We can always use help creating, tests, documentation or resolving [Issues](https://github.com/assemble/assemble/issues), but if you have other ideas for how you can help, Brian and I would love to hear them!
[https://github.com/assemble/assemble/issues](http://github.com/assemble/assemble/issues)
- In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
-
+
## Authors
@@ -578,29 +567,12 @@ Want to help make **assemble** even better? All constructive feedback and contri
+ [http://twitter.com/doowb](http://twitter.com/doowb)
+ [http://github.com/doowb](http://github.com/doowb)
-## About
-
-> The goal of Assemble is to offer:
-
-* Conventions for building and maintaining static sites and UI pattern libraries, using HTML, CSS/LESS/SASS, client-side templates and structured data
-* Patterns for highly reusable layouts, pages, includes/partials, "snippets" and so on
-* Strategies for externalizing metadata, data and content into maintainable formats, such as markdown, JSON, YAML, text, HTML and others
-* Ability to use simple JSON or YAML to configure and define the structure of entire projects, static sites or component libraries
-* Configurable and extensible enough for programmers, but easy for non-programmers to learn and use.
-
-
-## Coming Soon!
-+ [Upstage](http://github.com/upstage): COMING SOON! We are preparing to launch a library of seriously high quality UI components, each constructed following the same conventions we encourage with Assemble.
-
-
-
## Copyright and license
Copyright 2013 Assemble
[MIT License](LICENSE-MIT)
## Release History
-
* 2013-03-18 v0.3.14 new relative helper for resolving relative paths
* 2013-03-16 v0.3.13 new dashify and formatPhone helpers
* then-til-now v0.1.0-v0.3.0 Leaned how to commit too many times while working on README.
@@ -608,22 +580,23 @@ Copyright 2013 Assemble
### Roadmap
-* nothing yet.
-
+_(Big plans in the works)_
---
+Authored by [assemble](https://github.com/assemble/assemble)
-_This file was generated with Grunt and [assemble](http://github.com/assemble/assemble) on Tue Mar 19 2013 16:17:25._
-
-
+_This file was generated using Grunt and [assemble](http://github.com/assemble/assemble) on Fri Mar 22 2013 08:11:53._
[download]: https://github.com/assemble/assemble/zipball/master
+
[org]: https://github.com/assemble
+[assemble]: https://github.com/assemble/assemble
[issues]: https://github.com/assemble/assemble/issues
-[styles]: https://github.com/assemble/assemble-styles
+[wiki]: https://github.com/assemble/assemble/wiki
+
[config]: https://github.com/assemble/assemble/wiki/Configuration
@@ -636,28 +609,33 @@ _This file was generated with Grunt and [assemble](http://github.com/assemble/as
[layouts]: https://github.com/assemble/assemble/wiki/Layouts
[pages]: https://github.com/assemble/assemble/wiki/Pages
[partials]: https://github.com/assemble/assemble/wiki/Partials
-[helpers]: https://github.com/assemble/assemble/wiki/Helpers
-[collections]: https://github.com/assemble/assemble/wiki/Collections
-[assets]: https://github.com/assemble/assemble/wiki/Assets
[content]: https://github.com/assemble/assemble/wiki/Content
[data]: https://github.com/assemble/assemble/wiki/Data
+[yaml]: https://github.com/assemble/assemble/wiki/YAML-front-matter
[markdown]: https://github.com/assemble/assemble/wiki/Markdown
+[helpers]: https://github.com/assemble/assemble/wiki/Helpers
+[assets]: https://github.com/assemble/assemble/wiki/Assets
+[collections]: https://github.com/assemble/assemble/wiki/Collections
+
+
[examples]: https://github.com/assemble/assemble-examples
-[exampleSite]: https://github.com/assemble/assemble-examples
-[exampleBasic]: https://github.com/assemble/assemble-examples
-[exampleAdvanced]: https://github.com/assemble/assemble-examples
-[exampleGrid]: https://github.com/assemble/assemble-examples
-[exampleTable]: https://github.com/assemble/assemble-examples
-[exampleForm]: https://github.com/assemble/assemble-examples
+[exampleReadme]: https://github.com/assemble/assemble-examples-readme
+[exampleBasic]: https://github.com/assemble/assemble-examples-basic
+[exampleAdvanced]: https://github.com/assemble/assemble-examples-advanced
+[exampleGrid]: https://github.com/assemble/assemble-examples-grid
+[exampleTable]: https://github.com/assemble/assemble-examples-table
+[exampleForm]: https://github.com/assemble/assemble-examples-form
+[exampleSite]: https://github.com/assemble/assemble-examples-site
+[exampleSitemap]: https://github.com/assemble/assemble-examples-sitemap
[contribute]: https://github.com/assemble/assemble/wiki/Contributing-to-Assemble
[extend]: https://github.com/assemble/assemble/wiki/Extending-Assemble
-[helpers-lib]: https://github.com/assemble/helpers-lib
+[helpers-lib]: https://github.com/assemble/assemble/wiki/Helpers
[grunt]: http://gruntjs.com/
@@ -678,4 +656,3 @@ _This file was generated with Grunt and [assemble](http://github.com/assemble/as
[helper-lib]: https://github.com/assemble/helper-lib
[grunt-dry]: https://github.com/assemble/grunt-dry
[assemble-examples]: https://github.com/assemble/assemble-examples
-
View
2  component.json
@@ -1,6 +1,6 @@
{
"name": "assemble",
- "version": "0.3.14",
+ "version": "0.3.2",
"main": [
"./lib/assemble.js"
],
View
7 docs/docs-about.md
@@ -8,5 +8,8 @@
* Configurable and extensible enough for programmers, but easy for non-programmers to learn and use.
-## Coming Soon!
-+ [Upstage](http://github.com/upstage): COMING SOON! We are preparing to launch a library of seriously high quality UI components, each constructed following the same conventions we encourage with Assemble.
+## Related Projects
+
++ [assemble-styles](http://github.com/assemble/assemble-styles): a powerful and flexible [Grunt plugin](http://gruntjs.com/plugins) for compiling LESS to CSS. The `styles` task leverages [JSON and Lo-dash templates](http://gruntjs.com/configuring-tasks) for defining any number of LESS "bundles", UI components, compressed stylesheets or themes.
++ [helper-lib](http://github.com/assemble/): An extensive collection of useful Handlebars helpers used in by Assemble (more than 75 at last count!).
++ [Upstage](http://github.com/upstage): **COMING SOON!** We are preparing to launch a library of seriously high quality UI components, each constructed following the same conventions we encourage with Assemble.
View
25 docs/docs-contributing.md
@@ -1,24 +1,3 @@
-**Contributions are welcome!**. Want to help make Assemble even awesomer? Please consider contributing! All constructive feedback and contributions are welcome.
-
-* Please comment your code and submit all pull requests against a development branch.
-* If your pull request contains javascript patches or features, please include relevant unit tests.
-* If you like what we're doing but you prefer using different templating libraries than we currently offer, we encourage you to make a feature request or submit a pull request.
-
-
-### What we need
-We can always use help dwindling down the [Issues](https://github.com/assemble/assemble/issues), but here are other ways you can help:
-
- * **Documentation**: we can always use help with docs. Creating new docs, filling in missing information, examples, corrections, grammar. You name it, we need it.
- * **Tell us your experience with Assemble**: Use assemble, give us feedback and tell us how to improve, or add feature requests.
- * **Have an idea? Tell us about it.** You can contact us via GitHub issues or via email (found on author's profiles)
-
-
-## Bug tracker
-Have a bug? Please create an issue here on GitHub that conforms with [necolas's guidelines](https://github.com/necolas/issue-guidelines).
-
-[https://github.com/assemble/assemble/issues][assemble-issues]
-
-
-## Coming Soon!
-+ [Upstage](http://github.com/upstage): COMING SOON! We are preparing to launch a library of seriously high quality UI components, each constructed following the same conventions we encourage with Assemble.
+Want to help make **assemble** even better? All constructive feedback and contributions are welcome, so please consider contributing! We can always use help creating, tests, documentation or resolving [Issues](https://github.com/assemble/assemble/issues), but if you have other ideas for how you can help, Brian and I would love to hear them!
+[https://github.com/assemble/assemble/issues](http://github.com/assemble/assemble/issues)
View
126 docs/docs-examples.md
@@ -1,50 +1,4 @@
-#### Build templates
-
-```javascript
-assemble: {
- templates: {
- files: {
- 'index.html': ['index.hbs']
- }
- }
-}
-```
-
-#### Build multiple specified files individually
-
-You can specify multiple `destination: [source]` items in `files`.
-
-```javascript
-assemble: {
- gh_pages: {
- files: {
- 'docs': ['getting-started.hbs'],
- '.': ['index.hbs']
- }
- }
-}
-```
-
-#### Build directory of files
-
-Grunt supports filename expansion (also know as globbing) via the built-in [node-glob][node-glob] and [minimatch][minimatch] libraries. So Templates may be used in filepaths or glob patterns.
-
-```javascript
-assemble: {
- project: {
- files: {
- '.': ['templates/*.hbs']
- }
- }
-}
-```
-
-
-## Features
-Many, many more features are already implemented, and we are documenting them as you read this, so **check back frequently for updates**!!!
-
-
### Markdown
> Wouldn't it be awesome if you could just _use markdown however you wanted, wherever you needed it_?
@@ -59,13 +13,12 @@ Assemble gives you the flexibility to:
_Read more about markdown features and `options` in the [markdown documentation][markdown]._
-#### Include/import external content
-
-Use the markdown expression, `\{{md}}`, to enable importing of external markdown content.
+### "Include" extenal content
+Use the markdown expression, `{{md}}`, to enable importing of external markdown content.
**Example #1: using full path**
``` handlebars
-\{{md ../path/to/content.md}}
+{{md ../path/to/content.md}}
```
**Example #2: using variables**
@@ -81,16 +34,16 @@ content: ../path/to/content.md
then use it like this:
``` handlebars
-\{{md content}}
+{{md content}}
```
#### Write "inline" markdown
-The `\{{#markdown}}\{{/markdown}}` block expression allows markdown to be written "inline" with any HTML and handlebars content.
+The `{{#markdown}}{{/markdown}}` block expression allows markdown to be written "inline" with any HTML and handlebars content.
Example:
``` handlebars
-\{{#markdown}}
+{{#markdown}}
# Inline Markdown is awesome
> this is markdown content
@@ -101,20 +54,63 @@ Example:
* even links look prettier
### Pretty links
-[Visit Assemble](http://github.com/assemble/assemble)
+[Visit Assemble](https://github.com/assemble/assemble)
### Even Prettier links
Embed handlebars templates to make them even prettier.
-\{{#page.links}}
-[\{{text}}](\{{href}})
-\{{/page.links}}
+{{#page.links}}
+[{{text}}]({{href}})
+{{/page.links}}
-\{{/markdown}}
+{{/markdown}}
```
---
+### Task defaults
+Task targets, files and options may be specified according to the grunt [Configuring tasks](https://github.com/assemble/assemble/wiki/Task-and-Targets) guide.
+
+#### Build templates
+
+```javascript
+assemble: {
+ templates: {
+ files: {
+ 'index.html': ['index.hbs']
+ }
+ }
+}
+```
+
+#### Build multiple specified files individually
+
+You can specify multiple `destination: [source]` items in `files`.
+
+```javascript
+assemble: {
+ gh_pages: {
+ files: {
+ 'docs': ['getting-started.hbs'],
+ '.': ['index.hbs']
+ }
+ }
+}
+```
+
+#### Build directory of files
+
+Grunt supports filename expansion (also know as globbing) via the built-in [node-glob][node-glob] and [minimatch][minimatch] libraries. So Templates may be used in filepaths or glob patterns.
+
+```javascript
+assemble: {
+ project: {
+ files: {
+ '.': ['templates/*.hbs']
+ }
+ }
+}
+```
## Example Projects
Browse the [examples][assemble-examples] folder to get a better idea of what Assemble can do. To build the examples run `grunt examples`.
@@ -134,17 +130,17 @@ The finished result of the example project looks like this:
This is what our handlebars grid looks like. **_No really, this is the code for the entire grid!_**:
``` html
-\{{#grid.container}}
+{{#grid.container}}
<div class="container">
- \{{#rows}}
+ {{#rows}}
<div class="row">
- \{{#columns}}
- <div class="span\{{width}}"> \{{md content}} </div>
- \{{/columns}}
+ {{#columns}}
+ <div class="span{{width}}"> {{md content}} </div>
+ {{/columns}}
</div>
- \{{/rows}}
+ {{/rows}}
</div>
-\{{/grid.container}}
+{{/grid.container}}
```
And then we use an external data file, either `grid.yml` or `grid.json`, to configure the grid and provide the content.
View
0  docs/docs-getting-started.md → docs/docs-getting-started-example.md
File renamed without changes
View
14 docs/docs-getting-started-plugin.md
@@ -0,0 +1,14 @@
+## Getting Started
+This plugin requires Grunt `~0.4.1`
+
+If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
+
+```shell
+npm install assemble
+```
+
+Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
+
+```js
+grunt.loadNpmTasks('assemble');
+```
View
95 docs/docs-options.md
@@ -1,56 +1,12 @@
See the [Options](https://github.com/assemble/assemble/wiki/Options) section on the Wiki for more information.
-
-### Task defaults
-Task targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.
-
-
-#### engine
-Type: `String`
-Default: `handlebars`
-
-The engine to use for processing client-side templates. Assemble ships Handlebars as the default template engine, if you are interested in using a different engine visit the documentation to see an up-to-date list of template engines.
-
-Pull requests are welcome for additional template engines. Since we're still working to update the docs, you many also contact [@doowb](http://github.com/doowb) for more information or create an [Issue][assemble-issues].
-
-#### helpers
-Type: `String`
-Default: `undefined`
-
-Path defined to a directory of helpers to use with the specified template engine.
-
-``` js
-assemble: {
- options: {
- helpers: 'assemble-helpers-handlebars'
- },
- ...
-}
-```
-
-Handlebars, Assemble's default template engine, includes the following built-in helpers: `\{{#each}}`, `\{{#if}}`, and `\{{#unless}}`.
-
-[helper-lib][helper-lib] adds approximately **75 additional helpers**. To include them, follow these instructions:
- * Run: `npm install assemble-helpers-handlebars`
- * Add `assemble-helpers-handlebars` to the `options.helpers` property
- * To learn more visit the [assemble-helpers-handlebars][assemble-helpers-handlebars] repo.
- * See the list of [handlebars helpers][helpers-docs] here.
-
-
-#### flatten
-Type: `Boolean`
-Default: `false`
-
-Remove anything after (and including) the first "." in the destination path, then append this value.
-
-
#### assets
Type: `String`
Default: `false`
TODO...
-Used by the `\{{assets}}` template to resolve the relative path to the dest assets folder from the dest file.
+Used by the `{{assets}}` template to resolve the relative path to the dest assets folder from the dest file.
Example:
@@ -65,7 +21,7 @@ assemble: {
Example usage:
``` html
-<link href="\{{assets}}/css/styles.css" rel="stylesheet">
+<link href="{{assets}}/css/styles.css" rel="stylesheet">
```
Resulting in:
@@ -73,24 +29,22 @@ Resulting in:
<link href="dist/assets/css/styles.css" rel="stylesheet">
```
-
#### data
Type: `String`
Default: `src/data`
-Load data for templates and [configuration][config] from specified `JSON` and/or `YAML` files.
+Data from specified `JSON` and/or `YAML` files gets passed through the `data` object to the options on the assemble task, then to the context in your templates. The data object is also useful for adding [configuration][config] data. _Note that Handlebars.js is the only supported template engine at this time_. If you would like to see another engine added to Assemble, please make a [feature request][issues] (or pull request).
Example:
-
``` js
assemble: {
options: {
- data: ['src/data/*.json', 'config/global.json']
+ data: ['src/data/*.{json,yml,yaml}', 'config/global.json', 'styles/bootstrap.json']
},
...
}
```
-Example `widget.json` data file:
+Data: `widget.json`
``` json
{
"name": "Square Widget",
@@ -98,16 +52,16 @@ Example `widget.json` data file:
}
```
-Example `widget.hbs` template:
+Template: `widget.hbs`
``` html
-<div class="widget \{{ widget.modifier }}">\{{ widget.name }}</div>
+<div class="widget {{ widget.modifier }}">{{ widget.name }}</div>
```
Compiled result after running `grunt assemble`:
``` html
<div class="widget widget-square">Square Widget</div>
```
-Also see: [YAML front matter] todo...
+Also see: [YAML front matter][yaml] todo...
#### layout
@@ -127,7 +81,6 @@ assemble: {
}
```
-
#### partials
Type: `String`
Default: `undefined`
@@ -145,6 +98,29 @@ assemble: {
}
```
+#### engine
+Type: `String`
+Default: `handlebars`
+
+The engine to use for processing client-side templates. Assemble ships Handlebars as the default template engine, if you are interested in using a different engine visit the documentation to see an up-to-date list of template engines.
+
+Pull requests are welcome for additional template engines. Since we're still working to update the docs, you many also contact [@doowb](http://github.com/doowb) for more information or create an [Issue][assemble-issues].
+
+#### helpers
+Type: `String`
+Default: `undefined`
+
+Path defined to a directory of custom helpers to use with the specified template engine. Assemble currently includes more than **[75 built-in Handlebars helpers](https://github.com/assemble/helper-lib)**, since Handlebars is the default engine for Assemble.
+
+``` js
+assemble: {
+ options: {
+ helpers: 'your/custom/helpers'
+ },
+ ...
+}
+```
+
#### ext
Type: `String`
Default: `.html`
@@ -176,25 +152,28 @@ assemble: {
}
```
+#### flatten
+Type: `Boolean`
+Default: `false`
+
+Remove anything after (and including) the first "." in the destination path, then append this value.
+
### YAML options
Assemble makes the following options available from `js-yaml`. See [js-yaml](https://github.com/nodeca/js-yaml) for more information.
-
#### filename
Type: `String`
Default: `null`
String to be used as a file path in error/warning messages.
-
#### strict
Type: `Boolean`
Default: `false`
Makes the loader to throw errors instead of warnings.
-
#### schema
Type: `String`
Default: `DEFAULT_SCHEMA`
View
6 docs/docs-overview.md
@@ -2,7 +2,7 @@ In your project's Gruntfile, add a section named `assemble` to the data object p
```js
grunt.initConfig({
- {{ docs.name }}: {
+ assemble: {
options: {
// Task-specific options go here.
},
@@ -11,11 +11,11 @@ grunt.initConfig({
}
}
});
-grunt.loadNpmTasks('{{ docs.name }}');
+grunt.loadNpmTasks('assemble');
grunt.registerTask('default', [
'jshint',
- '{{ docs.name }}'
+ 'assemble'
]);
```
Task targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.
View
24 docs/docs-quick-start.md
@@ -1,30 +1,30 @@
-This plugin requires Grunt `{{ docs.devDependencies.grunt }}`
+This plugin requires Grunt `~0.4.1`
If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
#### with `npm`
```shell
-npm install {{{ docs.name }}} --save-dev
+npm install assemble --save-dev
```
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
```js
-grunt.loadNpmTasks('{{ docs.name }}');
+grunt.loadNpmTasks('assemble');
```
#### without `npm`
The following quick start alternatives are available:
-* [Download the latest release](https://github.com/{{docs.org}}/{{docs.name}}/zipball/master).
-* Clone the repo: `git clone git://github.com/{{docs.org}}/{{docs.name}}.git`.
-* Install with Twitter's [Bower](http://twitter.github.com/bower): `bower install {{docs.name}}`.
+* [Download the latest release](https://github.com/assemble/assemble/zipball/master).
+* Clone the repo: `git clone git://github.com/assemble/assemble.git`.
+* Install with Twitter's [Bower](http://twitter.github.com/bower): `bower install assemble`.
-### {{ docs.quick-start }}
-`{{ docs.name }}` provides convenient methods for building and running tests. Before you get started you must first install [the required local dependencies](package.json):
+### Compile Templates and Run Tests
+Before you get started you must first install [the required local dependencies](package.json):
```
$ npm install
@@ -32,13 +32,13 @@ $ npm install
When completed, you'll be able to run the various `grunt` commands provided:
-#### build - `grunt`
-Runs the Less.js compiler to rebuild the specified `/test/fixtures/**` files. {{ docs.build-requires }}.
+#### build - `grunt assemble`
+Runs the `assemble` task to rebuild the project.
#### test - `grunt test`
-Runs jshint on JavaScripts and nodeunit tests on {{ docs.file-types }}.
+Runs jshint on JavaScripts and mocha unit tests on your templates.
#### watch - `grunt watch`
-This is a convenience method for watching {{ docs.file-types }} and automatically re-building them whenever you save. Requires the [grunt-contrib-watch](http://github.com/gruntjs/grunt-contrib-watch) Grunt plugin.
+This is a convenience method for watching your templates and automatically re-building them whenever you save. Requires the [grunt-contrib-watch](http://github.com/gruntjs/grunt-contrib-watch) Grunt plugin.
Should you encounter problems with installing dependencies or running the `grunt` commands, be sure to first uninstall any previous versions (global and local) you may have installed, and then rerun `npm install`.
View
6 docs/docs-summary.md
@@ -1,3 +1,7 @@
-_This project just launched **so expect frequent changes** for the near future, and if you find this project interesting please consider starring it to receive updates. If you have any questions or have any trouble getting Assemble to work, please create an Issue, we'd love to help._
+_This project just launched **so expect frequent changes**._ And if you find this project interesting please consider starring it to receive updates.
+
+### Getting Help
+
+Assemble has many more features implemented than what we've documented thus far, so check back frequently for udates. _If you have any questions or have any trouble getting Assemble to work, please feel free to create an [Issue][issues], we'd love to help._
#### [Please visit the wiki](http://github.com/assemble/assemble/wiki)
View
30 docs/toc.md
@@ -1,30 +0,0 @@
-
-
-**Table of Contents**
-
-- [The "assemble" task](#the-assemble-task)
-- [Options](#options)
- - [Task defaults](#task-defaults)
- - [engine](#engine)
- - [helpers](#helpers)
- - [flatten](#flatten)
- - [assets](#assets)
- - [data](#data)
- - [layout](#layout)
- - [partials](#partials)
- - [ext](#ext)
- - [YAML options](#yaml-options)
- - [filename](#filename)
- - [strict](#strict)
- - [schema](#schema)
-- [Features](#features)
- - [Markdown](#markdown)
- - ["Include" or import externalized content](#include-or-import-externalized-content)
- - [Write "inline" markdown](#write-inline-markdown)
-- [Example Projects](#example-projects)
- - [Build Bootstrap's Grid with JSON or YAML](#build-bootstraps-grid-with-json-or-yaml)
-- [About](#about)
-- [Bug tracker](#bug-tracker)
-- [Contributing](#contributing)
-- [Authors](#authors)
-- [License](#copyright-and-license)
View
2  package.json
@@ -1,7 +1,7 @@
{
"name": "assemble",
"description": "Get the rocks out of your socks. Assemble helps you **quickly launch static web projects** by emphasizing a strong separation of concerns between structure, style, content and configuration.",
- "version": "0.3.14",
+ "version": "0.3.2",
"homepage": "https://github.com/assemble/assemble",
"author": {
"name": "assemble",
View
8 test/files/helpers.hbs
@@ -16,12 +16,8 @@ text: helpers.js
{{gist '5193239'}}
-
-
-
-
-
-
+## debug
+{{debug text}}
Please sign in to comment.
Something went wrong with that request. Please try again.