New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dust-compiler

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dust-compiler

Dust.js template watcher/compiler with support for notifications on OS X, Linux, and even Windows

latest
Source
npmnpm
Version
0.3.9
Version published
Maintainers
1
Created
Source

Dust Compiler

This is a basic dust compiler, there are many out there. This one adds support for the OS X 10.8.x Notification Center and notifications on modern Linux desktops to bring more visiblity to compile errors when developing while the terminal window that it is running in is not visible.

Build Status NPM version Dependency Status Bitdeli Badge

Install

It is recommended to install this globally so you can have dust-copmiler to run from any location on your machine, for any project you are working on.

$ npm install -g dust-compiler

File Extension

Expectation is that the files being compiled end in the .dust file extension

Enabling notifications in Linux

Many Linux distributions ship with the notify-send tool already installed. If not, you will need to install the "libnotify-bin" (Ubuntu) or "libnotify" (RedHat / Fedora) packages.

Turning it on

To fire it up just do this:

$ dust-compiler -s source_path -d destination_path

Notifications will look like this:

Success!

or Failure :(

Bootstrapping

In cases where you are creating a new project and have lots of existing dust templates, you will want to bootstrap the files. To save time you can run the following to automatically build everything in the source folder.

$ dust-compiler -s source_path -d destination_path --bootstrap

Disabling notifications

Don't like the notifications? Prefer to watch the terminal window instead?

$ dust-compiler -s source_path -d destination_path --nonotify

Include path in compiled template name

This may not be of value to everyone, but it is to me. In some conditions you may need the name of the compiled template that is registered in the Dust.js cache to include the path. Using the same templates on server side and client side may require this. I added a switch for that.

$ dust-compiler -s source_path -d destination_path --includepath

AMD

If you need your compiled template to be output AMD style you can add a --amd flag. This will wrap it with the following, where COMPILED_TEMPLATE contains the compiled template. I don't personally use templates this way. If this feature needs to be optimized, add details to issue #14 or open a new issue.

define(["dust"], function () { dust = require("dust"); COMPILED_TEMPLATE });

Overloading arguments

You can load up your command line with just about everything.

$ dust-compiler -s source_path -d destination_path --bootstrap --includepath --nonotify --amd

Development

Common Tasks

Look in the Gruntfile.js for more details.

  • grunt test - Runs all of the completed grunt test tasks.

  • npm run build-man - Builds the man page.

Keywords

compiler

FAQs

Package last updated on 04 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts