Documentation

Asset References

Some assets must be included in a page before others. For example, your code may use jQuery, so the jQuery script must be included first.

Cassette will sort all assets based on references they declare.

In any asset file, declare references to other assets or bundle paths in comments. This is the basic reference syntax.

@reference <path-1> <path-2> <path-3> ...

A reference path is relative to the current file. Start path with ~/ to be application relative.

References also work between bundle types. A script can reference a stylesheet. So then adding the script to the page automatically adds the stylesheet as well.

JavaScript

// @reference other.js
// @reference ../lib/jquery.js another.js "quotes-also-work.js"
// @reference ~/lib/backbone.js

JavaScript allow supports Visual Studio XML reference comments.

/// <reference path="other.js" />

CSS

/*
@reference reset.css
*/

HTML Templates

<!--
@reference ~/styles/product.css
-->

CoffeeScript

# @reference ../jquery.js

or

###
@reference ../jquery.js
@reference other.coffee
###

LESS

// @reference other.less

or

/* @reference another.css */