web-resource-inliner
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -9,3 +9,3 @@ { | ||
"description": "Inlines img, script and link tags into the same file.", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"keywords": [ | ||
@@ -12,0 +12,0 @@ "inline", |
@@ -73,6 +73,1 @@ # web-resource-inliner[![build status](https://secure.travis-ci.org/jrit/web-resource-inliner.png)](http://travis-ci.org/jrit/web-resource-inliner) | ||
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Run tests with `npm test`. | ||
## Release History | ||
* 2015-02-18 v1.0.1 use relativeTo with URLs to resolve web paths; use https: as default when paths start with // | ||
* 2015-01-01 v1.0.0 initial release: Forked and rewritten from grunt-inline with the goal of providing additional use cases and a new API |
@@ -119,3 +119,11 @@ "use strict"; | ||
{ | ||
callback( null, util.getInlineFileContents( src, relativeTo ) ); | ||
try | ||
{ | ||
var replacement = util.getInlineFileContents( src, relativeTo ); | ||
return callback( null, replacement ); | ||
} | ||
catch (err) | ||
{ | ||
return callback( err ); | ||
} | ||
} | ||
@@ -122,0 +130,0 @@ }; |
@@ -205,2 +205,14 @@ var assert = require('assert'); | ||
}); | ||
it('should pass missing file errors up through callbacks', function(done) { | ||
inline.html({ | ||
fileContent: readFile('test/cases/missing-file.html'), | ||
relativeTo: 'test/cases/' | ||
}, | ||
function(err, result) { | ||
assert.equal(!!err,true); | ||
done(); | ||
} | ||
); | ||
}); | ||
}); | ||
@@ -207,0 +219,0 @@ |
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
36135
41
578
73