Skip to content

Commit

Permalink
Small fix to the context
Browse files Browse the repository at this point in the history
  • Loading branch information
ixti committed Aug 16, 2012
1 parent d2c0b75 commit 7ba4dde
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/mincer/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Context.prototype.resolve = function (pathname, options, fn) {
content_type = options.contentType;

if (content_type) {
if ('self' === options.contentType) {
if ('~self~' === content_type) {
content_type = self.contentType;
}

Expand Down Expand Up @@ -220,7 +220,7 @@ Context.prototype.dependOnAsset = function (pathname) {
/**
* Context#requireAsset(pathname) -> Void
*
* `require_asset` declares `path` as a dependency of the file. The
* `requireAsset` declares `path` as a dependency of the file. The
* dependency will be inserted before the file and will only be
* included once.
*
Expand All @@ -230,7 +230,7 @@ Context.prototype.dependOnAsset = function (pathname) {
* <%= requireAsset("#{framework}.js") %>
**/
Context.prototype.requireAsset = function (pathname) {
pathname = this.resolve(pathname, {contentType: 'self'});
pathname = this.resolve(pathname, {contentType: '~self~'});
this.dependOnAsset(pathname);
this.__requiredPaths__.push(pathname);
};
Expand All @@ -244,7 +244,7 @@ Context.prototype.requireAsset = function (pathname) {
* in the bundle.
**/
Context.prototype.stubAsset = function (pathname) {
this.__stubbedAssets__.push(this.resolve(pathname, {contentType: 'self'}));
this.__stubbedAssets__.push(this.resolve(pathname, {contentType: '~self~'}));
};


Expand Down

0 comments on commit 7ba4dde

Please sign in to comment.