ParticleHelpers

Particle Helpers load particles from their respective paths within the project.

- particles
|-- conditions
|-- helpers
|-- mappings
|-- metadata
|-- outputs
|-- parameters
|-- partials
|-- resources
|-- sets

All helpers follow the same pattern

{{<CONDENSATION-HELPER> [module:<MODULE>] '<PATH_TO_PARTICLE>' [OPTIONS...]}}

When loading a particle from a module that starts with particles- the short form can also be used, where is the name of the module without particles-

{{<CONDENSATION-HELPER> [m:<M>] '<PATH_TO_PARTICLE>' [OPTIONS...]}}

Kind: global namespace

  • ParticleHelpers : object
    • [.condition([module], path, [...options])](#ParticleHelpers.condition) ⇒ string
    • [.mapping([module], path, [...options])](#ParticleHelpers.mapping) ⇒ string
    • [.metadata([module], path, [...options])](#ParticleHelpers.metadata) ⇒ string
    • [.output([module], path, [...options])](#ParticleHelpers.output) ⇒ string
    • [.parameter([module], path, [...options])](#ParticleHelpers.parameter) ⇒ string
    • [.resource([module], path, [...options])](#ParticleHelpers.resource) ⇒ string
    • [.helper([module], path, [...options])](#ParticleHelpers.helper) ⇒ *
    • [.partial([module], path, [...options])](#ParticleHelpers.partial) ⇒ string
    • [.set([module], path, [options])](#ParticleHelpers.set) ⇒ string

condition([module], path, [...options])

- particles
|- conditions
 |- particle_name

Kind: static method of ParticleHelpers

Param Type Description
[module] string module to load with either module:<MODULE> or m:<M>
path string Path to the particle (file extensions optional)
[...options] kv Key/Value pairs to pass to the particle

Example

{{condition "particle_name"}}

Example

{{condition "particle_name" foo="bar"}}

Example

{{condition "module:<MODULE>" 'particle_name'}}

Example

{{!-- to load modules with format `particles-NAME` --}}
{{condition "m:<NAME>" "particle_name"}}

mapping([module], path, [...options])

- particles
|- mappings
 |- particle_name

Kind: static method of ParticleHelpers

Param Type Description
[module] string module to load with either module:<MODULE> or m:<M>
path string Path to the particle (file extensions optional)
[...options] kv Key/Value pairs to pass to the particle

Example

{{mapping "particle_name"}}

Example

{{mapping "particle_name" foo="bar"}}

Example

{{mapping "module:<MODULE>" 'particle_name'}}

Example

{{!-- to load modules with format `particles-NAME` --}}
{{mapping "m:<NAME>" "particle_name"}}

metadata([module], path, [...options])

- particles
|- metadata
 |- particle_name

Kind: static method of ParticleHelpers

Param Type Description
[module] string module to load with either module:<MODULE> or m:<M>
path string Path to the particle (file extensions optional)
[...options] kv Key/Value pairs to pass to the particle

Example

{{metadata "particle_name"}}

Example

{{metadata "particle_name" foo="bar"}}

Example

{{metadata "module:<MODULE>" 'particle_name'}}

Example

{{!-- to load modules with format `particles-NAME` --}}
{{metadata "m:<NAME>" "particle_name"}}

output([module], path, [...options])

- particles
|- outputs
 |- particle_name

Kind: static method of ParticleHelpers

Param Type Description
[module] string module to load with either module:<MODULE> or m:<M>
path string Path to the particle (file extensions optional)
[...options] kv Key/Value pairs to pass to the particle

Example

{{output "particle_name"}}

Example

{{output "particle_name" foo="bar"}}

Example

{{output "module:<MODULE>" 'particle_name'}}

Example

{{!-- to load modules with format `particles-NAME` --}}
{{output "m:<NAME>" "particle_name"}}

parameter([module], path, [...options])

- particles
|- parameters
 |- particle_name

Kind: static method of ParticleHelpers

Param Type Description
[module] string module to load with either module:<MODULE> or m:<M>
path string Path to the particle (file extensions optional)
[...options] kv Key/Value pairs to pass to the particle

Example

{{parameter "particle_name"}}

Example

{{parameter "particle_name" foo="bar"}}

Example

{{parameter "module:<MODULE>" 'particle_name'}}

Example

{{!-- to load modules with format `particles-NAME` --}}
{{parameter "m:<NAME>" "particle_name"}}

resource([module], path, [...options])

- particles
|- resources
 |- particle_name

Kind: static method of ParticleHelpers

Param Type Description
[module] string module to load with either module:<MODULE> or m:<M>
path string Path to the particle (file extensions optional)
[...options] kv Key/Value pairs to pass to the particle

Example

{{resource "particle_name"}}

Example

{{resource "particle_name" foo="bar"}}

Example

{{resource "module:<MODULE>" 'particle_name'}}

Example

{{!-- to load modules with format `particles-NAME` --}}
{{resource "m:<NAME>" "particle_name"}}

helper([module], path, [...options])

- particles
|- helpers
 |- particle_name

Kind: static method of ParticleHelpers
Returns: * - - The output from the particle helper

Param Type Description
[module] string module to load with either module:<MODULE> or m:<M>
path string Path to the helper, excluding the .js extension
[...options] kv Key/Value pairs to pass to the particle helper

Example

{{helper "particle_name"}}

Example

{{helper "particle_name" foo="bar"}}

Example

{{helper "module:<MODULE>" 'particle_name'}}

Example

{{!-- to load modules with format `particles-NAME` --}}
{{helper "m:<NAME>" "particle_name"}}

partial([module], path, [...options])

- particles
|- partials
 |- particle_name

Kind: static method of ParticleHelpers

Param Type Description
[module] string module to load with either module:<MODULE> or m:<M>
path string Path to the partial (file extensions optional)
[...options] kv Key/Value pairs to pass to the particle partial

Example

{{partial "particle_name"}}

Example

{{partial "particle_name" foo="bar"}}

Example

{{partial "module:<MODULE>" 'particle_name'}}

Example

{{!-- to load modules with format `particles-NAME` --}}
{{partial "m:<NAME>" "particle_name"}}

set([module], path, [options])

- particles
|- sets
 |- particle_name

Kind: static method of ParticleHelpers

Param Type Description
[module] string module to load with either module:<MODULE> or m:<M>
path string Path to the set (file extensions optional)
[options] Object options for the set
[options.logicalIdPrefix] string Add a prefix to the set's scope
[options.logicalIdSuffix] string Add a suffix to the set's scope

Example

{{set "particle_name"}}

Example

{{set "particle_name" foo="bar"}}

Example

{{set "module:<MODULE>" 'particle_name'}}

Example

{{!-- to load modules with format `particles-NAME` --}}
{{set "m:<NAME>" "particle_name"}}