Skip to content

Commit

Permalink
Added tests to verify fix from updated version of cdnizer, updated re…
Browse files Browse the repository at this point in the history
…adme
  • Loading branch information
OverZealous committed Jun 12, 2014
1 parent c14cb01 commit 5ebfa23
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Allow for file names with `gulp-rev` appended strings, in the form of `<file>-XX
Type: `Boolean`
Default: `true`

Allow for file names to have `.min` inserted before the file extension (but after rev, if enabled). This allows you to use the base name for a file, and have `cndizer` match the minified name.
Allow for file names that optionally have `.min` inserted before the file extension (but after rev, if enabled). This allows you to use the base name for a file, and have `cndizer` match the minified name.

#### options.fallbackScript

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dependencies": {
"through2": "*",
"gulp-util": "~2.2.0",
"cdnizer": "*"
"cdnizer": "^0.2.6"
},
"devDependencies": {
"mocha": "*",
Expand Down
16 changes: 16 additions & 0 deletions test/expected/index-filename-min.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="css/main-ab12cd34.css">
</head>
<body>
<h1>Hello World</h1>
<script src="js/vendor/angular/angular.min.js"></script>
<script src="//examplecdn/js/vendor/firebase/firebase.min.js"></script>
<script src="js/vendor/angularfire/angularfire.js"></script>
<script src="js/app/app.js"></script>
</body>
</html>
9 changes: 9 additions & 0 deletions test/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ describe("gulp-cdnizer", function () {
defaultCDNBase: '//examplecdn'
}, 'index-fallback.html', done);
});

it("should add min with filenameMin", function(done) {
processInput({
files: [{
file: 'js/**/firebase/firebase.js',
cdn: '//examplecdn/js/vendor/firebase/${ filenameMin }'
}]
}, 'index-filename-min.html', done);
});

it("should handle bower versions (.bowerrc)", function (done) {
processInput({
Expand Down

0 comments on commit 5ebfa23

Please sign in to comment.