Description

Duo asset management integration.

Package Information

Version1.2.1 (2015-Mar-02)
Homepage https://projects.nekroze.com/projects/duod
Repository https://github.com/Nekroze/duod
LicenseMIT
CopyrightCopyright © 2015, Taylor Lawson
AuthorsTaylor "Nekroze" Lawson <tlawson@nekroze.com>
Registered byTaylor Lawson
Dependencies

tested

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

DuoD

By combining the powers of Duo and D's templates, DuoD provides a simple method to integrate the construction of frontend web resources with ease.

Duo allows you to write simple front end requirement files that pull in their dependencies when constructed. Combined with D's awesome templating, these assets can be constructed and utilized anywhere in your code or even in a Vibe.d diet template!.

Usage

Once DuoD is imported (import duod;) you can setup an asset to be built when the --duod-build switch is given to your application:

    Require!"assets/index.css";

Or if you would like the outputed asset to be minified with Yuglify:

    RequireMin!"assets/index.css";

But what is really fun is using the above command in a diet template with a mixin.

    - mixin(Require!"assets/index.css");

This is all that is required to provide the same build functionality as well as placing the HTML to use the asset in the rendered template output!

Example

Please see the examples directory of the repository for a usage example.

Available versions

1.2.1 1.2.0 1.1.2 1.1.1 1.1.0 1.0.0 ~master ~develop