assemble-core
Advanced tools
Comparing version 0.8.1 to 0.8.2
{ | ||
"name": "assemble-core", | ||
"description": "The core assemble application with no presets or defaults. All configuration is left to the implementor.", | ||
"version": "0.8.1", | ||
"version": "0.8.2", | ||
"homepage": "https://github.com/assemble/assemble-core", | ||
@@ -33,6 +33,6 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"assemble-render-file": "^0.3.1", | ||
"assemble-streams": "^0.3.0", | ||
"assemble-streams": "^0.3.1", | ||
"base-tasks": "^0.1.2", | ||
"lazy-cache": "^1.0.3", | ||
"templates": "^0.10.2" | ||
"templates": "^0.10.6" | ||
}, | ||
@@ -39,0 +39,0 @@ "devDependencies": { |
@@ -11,3 +11,2 @@ # assemble-core [![NPM version](https://img.shields.io/npm/v/assemble-core.svg)](https://www.npmjs.com/package/assemble-core) [![Build Status](https://img.shields.io/travis/assemble/assemble-core.svg)](https://travis-ci.org/assemble/assemble-core) | ||
- [API](#api) | ||
* [Assemble](index.js#L22) | ||
* [Templates API](#templates-api) | ||
@@ -73,10 +72,18 @@ * [File System API](#file-system-api) | ||
var app = assemble(); | ||
var view = app.view('foo', {content: 'Hi, my name is <%= name %>'}); | ||
app.render(view, { name: 'Brian' }, function(err, res) { | ||
console.log(res.content); | ||
//=> 'Hi, my name is Brian' | ||
}); | ||
``` | ||
Render a view from a collection: | ||
```js | ||
var app = assemble(); | ||
app.create('pages'); | ||
app.page('foo', {content: 'Hi, my name is <%= name %>'}) | ||
.use(function (view) { | ||
if (!view.contents) { | ||
view.contents = fs.readFileSync(view.path); | ||
} | ||
}) | ||
.set('data.name', 'Brian') | ||
@@ -288,3 +295,3 @@ .render(function (err, res) { | ||
As of January 12, 2016: | ||
As of January 19, 2016: | ||
@@ -342,2 +349,2 @@ ``` | ||
_This file was generated by [verb](https://github.com/verbose/verb) on January 12, 2016._ | ||
_This file was generated by [verb](https://github.com/verbose/verb) on January 19, 2016._ |
Sorry, the diff of this file is not supported yet
16177
346
Updatedassemble-streams@^0.3.1
Updatedtemplates@^0.10.6