Skip to content

Latest commit

 

History

History
165 lines (112 loc) · 2.51 KB

api.md

File metadata and controls

165 lines (112 loc) · 2.51 KB
title description category sortBy
Classes
The core classes exposed on Assemble's API
docs
40

Classes

Exposed as static properties

All classes are exposed as static properties on both the assemble constructor, and the assemble instance (app). Thus, they can all be accessed as follows:

var assemble = require('assemble');
var Collection = assemble.Collection;
var Group = assemble.Group;
var Item = assemble.Item;
var List = assemble.List;
var View = assemble.View;
var Views = assemble.Views;

// or
var app = assemble();
var Collection = app.Collection;
var Group = app.Group;
var Item = app.Item;
var List = app.List;
var View = app.View;
var Views = app.Views;

App

Create an instance of assemble with the given options.

Example

var assemble = require('assemble');
var app = assemble();

Sugar for:

var Assemble = require('assemble');
var app = new Assemble();

Collection

Create an instance of Collection with the given options.

Example

var Collection = app.Collection;
var collection = new Collection();

Learn more about Collect.

Group

Create an instance of Group with the given options.

Example

var Group = app.Group;
var group = new Group();

Learn more about Group.

Item

Create an instance of Item with the given options.

Example

var Item = app.Item;
var item = new Item();

Learn more about Item.

List

Create an instance of List with the given options.

Example

var List = app.List;
var list = new List();

Learn more about List.

Views

Create an instance of Views with the given options.

Example

var Views = app.Views;
var views = new Views();

Learn more about Views.

View

Create an instance of View with the given options.

Example

var View = app.View;
var view = new View();

Learn more about View.

Router

Create an instance of Router with the given options.

Example

var Router = app.Router;
var router = new Router();

Learn more about Router.

Route

Create an instance of Route with the given options.

Example

var Route = app.Route;
var route = new Route();

Learn more about Route.