Skip to content
This repository
Browse code

Fixing stylus versionPath function

  • Loading branch information...
commit cec9966bcab1c6bdf15351ec831d9d4fc80ae6f3 1 parent 653eb3e
Paul Serby authored February 02, 2012
4  examples/express-mapped/app.js
@@ -16,7 +16,9 @@ versionator.createMapFromPath(__dirname + '/public', function(error, staticFileM
16 16
       .set('filename', path)
17 17
       .set('warn', true)
18 18
       .set('compress', true)
19  
-      .define('versionPath', mappedVersion.versionPath);
  19
+      .define('versionPath', function(urlPath) {
  20
+        return 'url(' + mappedVersion.versionPath(urlPath) + ')';
  21
+      });
20 22
   }
21 23
 
22 24
   // Configuration
2  examples/express-mapped/public/css/style.styl
@@ -7,4 +7,4 @@ a
7 7
 #break
8 8
   width 100%
9 9
   height 10px
10  
-  background-image: url(versionPath('/images/background.png'))
  10
+  background-image: versionPath("/images/background.png")
4  examples/express/app.js
@@ -21,7 +21,9 @@ app.configure(function(){
21 21
       .set('filename', path)
22 22
       .set('warn', true)
23 23
       .set('compress', true)
24  
-      .define('versionPath', basic.versionPath);
  24
+      .define('versionPath', function(urlPath) {
  25
+        return 'url(' + basic.versionPath(urlPath) + ')';
  26
+      });
25 27
   }
26 28
 
27 29
   app
3  examples/express/public/css/style.styl
@@ -7,4 +7,5 @@ a
7 7
 #break
8 8
   width 100%
9 9
   height 10px
10  
-  background-image: url(versionPath('/images/background.png'))
  10
+  
  11
+  background-image: versionPath("/images/background.png")

0 notes on commit cec9966

Please sign in to comment.
Something went wrong with that request. Please try again.