Config

Mole~ Config

Provides config settings for main application to use

// mole.config.js
export default {
	theme: 'theme/',
	model: ['chars', 'tokens'],
	template: 'templates/',
	output: [
		{ css: { file: 'styles.css' } },
		{ ios: { file: 'styles.h' } },
		{ android: { file: 'styles.xml' } }
	]
}

Constructor

new Config()

Source:
Example
{
	theme: 'theme/',
	model: [ 'model-name' ],
	template: [ 'templates/' ],
	output: [
		{ css: { file: 'styles.css' } },
		{ ios: { file: 'styles.h' } },
		{ android: { file: 'styles.xml' } }
	]
}

Methods

(static) normaliseConfig(config)

Normalises user's config for easier use.

Source:
Parameters:
Name Type Description
config Object

The properties for the config

(static) putValuesIntoArray(value)

Checks if value is an array and if not creates an array

Source:
Parameters:
Name Type Description
value String | Array

The value to check if an array