LearnBoost/stylus — pull request #904 by mikesmullin (2012-12-02 03:33:08+00:00)
Title: FEATURE: convenient third-party plugin integration (i.e., for stylus-lemonade plugin)

to whom it may concerm,

i have developed on a third-party stylus plugin called [stylus-lemonade](https://github.com/mikesmullin/stylus-lemonade) which would enjoy the privilege of providing users with a convenient syntax and ability to affect the final rendered markup in a style of post-processing which is required for applications such as css image sprite processing, which my library does.

consider the following syntax:

var stylus = require('stylus');
stylus(markup_input)
.plugin('stylus-lemonade', {
image_path: __dirname + 'app/assets/images/',
sprite_path: __dirname + 'app/public/images/',
sprite_url: '/images/'
})
.render(function(err, css_output){
console.log(css_output);
});

notice the `plugin()` method. such is how the library functions for me currently, using my very isolated fork of stylus. furthermore, my plugin relies on the use of the `emit('end')` event emitted during `stylus.render()` from which it also takes the liberty to intercept flow control and manipulate the css results.

THEREFORE, i humbly request an earnest review--attached you will find two commits. pray tell whether you find this variation amicable toward the overarching design of the project. it is my hope and overarching desire that you will.

many thanks and best wishes.