assets-include
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -0,1 +1,6 @@ | ||
0.3.1 / 2012-07-04 | ||
================== | ||
* Fixed inline bundles with cache boosters. | ||
0.3.0 / 2012-07-03 | ||
@@ -2,0 +7,0 @@ ================== |
@@ -58,3 +58,9 @@ var AssetsExpander = require('assets-expander'), | ||
var bundleInfo = this._bundleInfo(locator), | ||
data = ''; | ||
if (this.options.bundled && this.cacheInfo) { | ||
var pathWithStamp = this._assetPathWithStamp(this._bundledPath(bundleInfo), bundleInfo); | ||
data = fs.readFileSync(path.join(this.options.root, pathWithStamp), 'utf-8'); | ||
} else { | ||
data = fs.readFileSync(this._bundledPath(bundleInfo), 'utf-8'); | ||
} | ||
@@ -61,0 +67,0 @@ switch (bundleInfo.typeExt) { |
@@ -5,3 +5,3 @@ { | ||
"description": "Include assets into your views with ease (assets-packager compatible).", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "url": "" |
@@ -61,3 +61,8 @@ var vows = require('vows'), | ||
} | ||
}), | ||
'inline with cache boosters': binaryContext('-i -b -s -r ./data/public -c ./data/config.yml javascripts/all.js', { | ||
'must give bundled script inclusion': function(error, stdout) { | ||
assert.equal("<script>123-booster</script>\n", stdout); | ||
} | ||
}) | ||
}); |
@@ -197,3 +197,9 @@ var vows = require('vows'), | ||
} | ||
}, { bundled: true }) | ||
}, { bundled: true }), | ||
'in bundled (prod) mode as CSS': includeContext({ | ||
'should give list of link tags': function(include) { | ||
var asFragment = include.inline('stylesheets/all.css'); | ||
assert.equal("<style type=\"text/css\">.one{}.two{}.three{}-booster</style>", asFragment); | ||
} | ||
}, { bundled: true, cacheBoosters: true }) | ||
}, | ||
@@ -215,4 +221,10 @@ 'inline scripts': { | ||
} | ||
}, { bundled: true }) | ||
}, { bundled: true }), | ||
'in bundled (prod) mode': includeContext({ | ||
'should give a bundled script tag': function(include) { | ||
var asFragment = include.inline('javascripts/all.js'); | ||
assert.equal("<script>123-booster</script>", asFragment); | ||
} | ||
}, { bundled: true, cacheBoosters: true }) | ||
} | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21081
25
386