Skip to content

Commit

Permalink
Plugin define
Browse files Browse the repository at this point in the history
  • Loading branch information
kpdecker committed Oct 3, 2011
1 parent 367b691 commit a47ffaf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./lib/stylus-images')
14 changes: 14 additions & 0 deletions lib/stylus-images.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var Scanner = require('./url-scanner'),
url = require('./url');

function mergeUrls() {
new Scanner(this.root, this.imagesSeen).combine();
return new nodes.Expression(false);
}

module.exports = function() {
return function(stylus) {
stylus.define('url', url());
stylus.define('merge-urls', mergeUrls);
};
};

0 comments on commit a47ffaf

Please sign in to comment.