npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dust-compiler

v0.3.9

Published

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

Downloads

26

Readme

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.