1.6.1 • Published 6 years ago

@dadi/dustjs-helpers v1.6.1

Weekly downloads
1
License
-
Repository
github
Last release
6 years ago

DADI Dust.js helpers

npm (scoped) coverage Build Status JavaScript Style Guide semantic-release

A collection of Dust.js helpers used in DADI+ projects.

Install

npm install @dadi/dustjs-helpers --save

Load the helpers

/* app/utils/helpers/loader.js */

// first, a reference to the loaded pages and routes within your application
var components = require('@dadi/web').Components

// also, a reference to the Dust template module inside DADI Web
var dust = require('@dadi/web').Dust

// Load DADI helpers
require('@dadi/dustjs-helpers')(dust.getEngine(), { components: components })

More helpers

We also recommend including the common DustJS helpers from https://github.com/rodw/common-dustjs-helpers.

npm install common-dustjs-helpers --save

Add the following to your loader.js file

// Load common-dustjs-helpers
var commonDustHelpers = require('common-dustjs-helpers')
new commonDustHelpers.CommonDustjsHelpers().export_helpers_to(dust.getEngine())

Development

  1. Clone this repository
  2. Make your changes to dadi-dustjs-helpers.js
  3. Add your tests to test/test.js
  4. Run test suite

    npm test
  5. Build minified file

    npm run build
1.6.1

6 years ago

1.6.0

7 years ago

1.5.0

7 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago