Output

Mole~ Output

Creates an output which is then consumable by mole.build()

{
	output: [
		{
			name: 'css',
			template: 'The color red is {{color.red}}',
			model: {
				token: {
					name: 'colorRed',
					value: '#FF0000'
				}
			},
			path: 'output/file.css'
		}
	]
}

Constructor

new Output()

Properties:
Name Type Description
name String

The name of the output

template String

A template which is available to render with a model

model Object

The model used to provide the context for the template

Source:
See:
  • mole.build()

Methods

(private, static) getContent(output, peripherals) → {String|Object}

Gets the content from plugin, directory or file

Source:
Parameters:
Name Type Description
output Object

An individual output

peripherals Object

A List of peripherals which contain models and/or templates

Returns:
Type:
String | Object

Returns either an object for a model or an string for a template