Barefoot.Util

Contains helper functions for loading environment specific mixins.

These utilities are only available inside of barefoot.

Summary
Barefoot.UtilContains helper functions for loading environment specific mixins.
Functions
getEnvironmentReturns a string representing the current environment.
loadMixinsForEnvironmentLoads mixins for a specific environment
loadMixinsSince Barefoot is runnable on server and client, this function returns environment specific code read from the “server” and “client” folder and returns the needed code fragments.

Functions

getEnvironment

function getEnvironment()

Returns a string representing the current environment.

Returns

(String) “client” or “server”

loadMixinsForEnvironment

function loadMixinsForEnvironment(environment)

Loads mixins for a specific environment

Parameters

(String) environment”client” or “server”

Returns

(Object) mixin

loadMixins

function loadMixins(environment)

Since Barefoot is runnable on server and client, this function returns environment specific code read from the “server” and “client” folder and returns the needed code fragments.

Returns

A mixin to give a Backbone object barefoot capabilities.

function getEnvironment()
Returns a string representing the current environment.
function loadMixinsForEnvironment(environment)
Loads mixins for a specific environment
function loadMixins(environment)
Since Barefoot is runnable on server and client, this function returns environment specific code read from the “server” and “client” folder and returns the needed code fragments.
Close