Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing stylus versionPath function

  • Loading branch information...
commit cec9966bcab1c6bdf15351ec831d9d4fc80ae6f3 1 parent 653eb3e
@serby authored
View
4 examples/express-mapped/app.js
@@ -16,7 +16,9 @@ versionator.createMapFromPath(__dirname + '/public', function(error, staticFileM
.set('filename', path)
.set('warn', true)
.set('compress', true)
- .define('versionPath', mappedVersion.versionPath);
+ .define('versionPath', function(urlPath) {
+ return 'url(' + mappedVersion.versionPath(urlPath) + ')';
+ });
}
// Configuration
View
2  examples/express-mapped/public/css/style.styl
@@ -7,4 +7,4 @@ a
#break
width 100%
height 10px
- background-image: url(versionPath('/images/background.png'))
+ background-image: versionPath("/images/background.png")
View
4 examples/express/app.js
@@ -21,7 +21,9 @@ app.configure(function(){
.set('filename', path)
.set('warn', true)
.set('compress', true)
- .define('versionPath', basic.versionPath);
+ .define('versionPath', function(urlPath) {
+ return 'url(' + basic.versionPath(urlPath) + ')';
+ });
}
app
View
3  examples/express/public/css/style.styl
@@ -7,4 +7,5 @@ a
#break
width 100%
height 10px
- background-image: url(versionPath('/images/background.png'))
+
+ background-image: versionPath("/images/background.png")
Please sign in to comment.
Something went wrong with that request. Please try again.