{"id":22800003,"url":"https://github.com/dadi/web-dustjs","last_synced_at":"2025-03-30T19:17:40.708Z","repository":{"id":57105387,"uuid":"90366728","full_name":"dadi/web-dustjs","owner":"dadi","description":"A Dust.js interface for DADI Web","archived":false,"fork":false,"pushed_at":"2019-05-01T09:07:33.000Z","size":27,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-25T11:42:36.299Z","etag":null,"topics":["dadi","dadi-web","dust","dust-js","schema-less","web-server"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dadi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-05T10:53:56.000Z","updated_at":"2019-05-01T09:07:35.000Z","dependencies_parsed_at":"2022-08-20T23:50:08.265Z","dependency_job_id":null,"html_url":"https://github.com/dadi/web-dustjs","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadi%2Fweb-dustjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadi%2Fweb-dustjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadi%2Fweb-dustjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadi%2Fweb-dustjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dadi","download_url":"https://codeload.github.com/dadi/web-dustjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246365644,"owners_count":20765549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dadi","dadi-web","dust","dust-js","schema-less","web-server"],"created_at":"2024-12-12T07:10:46.580Z","updated_at":"2025-03-30T19:17:40.421Z","avatar_url":"https://github.com/dadi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://dadi.cloud/assets/products/dadi-web-full.png\" alt=\"DADI Web\" height=\"65\"/\u003e\n\n## Dust.js engine interface\n\n[![npm (scoped)](https://img.shields.io/npm/v/@dadi/web-dustjs.svg?maxAge=10800\u0026style=flat-square)](https://www.npmjs.com/package/@dadi/web-dustjs)\n[![Coverage Status](https://coveralls.io/repos/github/dadi/web-dustjs/badge.svg?branch=master)](https://coveralls.io/github/dadi/web-dustjs?branch=master)\n[![Build Status](https://travis-ci.org/dadi/web-dustjs.svg?branch=master)](https://travis-ci.org/dadi/web-dustjs)\n[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)\n\nThis module allows [Dust.js](http://www.dustjs.com/) templates to be used with [DADI Web](https://github.com/dadi/web).\n\n## Installation\n\n- Add this module as a dependency:\n\n   ```\n   npm install @dadi/web-dustjs --save\n   ```\n\n- Include it in the `engines` array passed to Web:\n\n   ```npm\n   require('@dadi/web')({\n     engines: [\n       require('@dadi/web-dustjs')\n     ]\n   })\n   ```\n\n## Configuration\n\nThe following configuration parameters can be added to the global Web config file, under `engines.dust`.\n\n### `cache`\n\nIf `true`, compiled templates are saved to the Dust cache (recommended).\n\n- Format: `Boolean`\n- Default: `true`\n\n---\n\n### `debug`\n\nDust.js debug mode enabled.\n\n- Format: `Boolean`\n- Default: `false`\n\n---\n\n### `debugLevel`\n\nThe debug level to use. Should be one of `DEBUG`, `INFO`, `WARN` or `ERROR`.\n\n- Format: `String`\n- Default: 'WARN'\n\n---\n\n## `whitespace`\n\nPreserve whitespace in the output.\n\n- Format: `Boolean`\n- Default: `true`\n\n---\n\n## `clientRender`\n      \n#### `enabled`\n        \nIf `true`, compiled templates are made available to the client-side.\n\n- Format: `Boolean`\n- Default: `false`\n\n#### `format`\n\nDefines whether compiled templates are written to individual JS files ('separate') or combined into a single one ('combined').\n\n- Format: ['separate', 'combined']\n- Default: 'separate'\n\n#### `path`\n\nThe location where compiled templates should be written to, relative to 'public'. This should be a folder when 'format' is 'separate' and a file when 'combined'.\n\n- Format: `String`\n- Default: `'templates'`\n\n#### `whitelist`\n\nWhen defined, only templates with names matching an entry in whitelist will be made available to the client. Wildcards supported.\n\n- Format: `Array`\n- Default: `[]`\n\n---\n\n### `paths`\n\nPaths required by Dust.\n\n- Format: `Object`\n- Default:\n    ```\n    {\n      {\n        filters: 'workspace/utils/filters',\n        helpers: 'workspace/utils/helpers'\n      }\n    }\n    ```\n\n## Helpers\n\nThis module automatically includes the official set of [helpers by LinkedIn](https://github.com/linkedin/dustjs-helpers). Other helper modules will need to be required manually, using a loader file placed in the helpers directory defined in config (e.g. `workspace/utils/helpers/loader.js`)\n\n*Example:*\n\n```js\nvar components = require('@dadi/web').Components\nvar dust = require('dustjs-linkedin')\n\n// Load common-dustjs-helpers\nvar commonDustHelpers = require('common-dustjs-helpers')\nnew commonDustHelpers.CommonDustjsHelpers().export_helpers_to(dust)\n\n// Load the DADI helper pack\nrequire('@dadi/dustjs-helpers')(dust, { components: components })\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdadi%2Fweb-dustjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdadi%2Fweb-dustjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdadi%2Fweb-dustjs/lists"}