Socket
Socket
Sign inDemoInstall

assets-include

Package Overview
Dependencies
4
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0 to 0.3.1

test/data/public/javascripts/bundled/all-test1234567.js

5

History.md

@@ -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) {

2

package.json

@@ -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 })
}
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc