lib/middleware.js
function compile() {
        debug('read %s', cssPath);
        fs.readFile(stylusPath, 'utf8', function(err, str){
          if (err) return error(err);
          var style = options.compile(str, stylusPath);
          var paths = style.options._imports = [];
          imports[stylusPath] = null;
          style.render(function(err, css){
            if (err) return next(err);
            debug('render %s', stylusPath);
            imports[stylusPath] = paths;
            mkdir(dirname(cssPath), { mode: parseInt('0700', 8), recursive: true }, function(err){
              if (err) return error(err);
              fs.writeFile(cssPath, css, 'utf8', next);
            });
          });
        });
      }
function compile() {
        debug('read %s', cssPath);
        fs.readFile(stylusPath, 'utf8', function(err, str){
          if (err) return error(err);
          var style = options.compile(str, stylusPath);
          var paths = style.options._imports = [];
          imports[stylusPath] = null;
          style.render(function(err, css){
            if (err) return next(err);
            debug('render %s', stylusPath);
            imports[stylusPath] = paths;
            mkdir(dirname(cssPath), { mode: parseInt('0700', 8), recursive: true }, function(err){
              if (err) return error(err);
              fs.writeFile(cssPath, css, 'utf8', next);
            });
          });
        });
      }
function compile ( ) { debug ( 'read %s' , cssPath ) ; fs . readFile ( stylusPath , 'utf8' , function ( err , str ) { if ( err ) return error ( err ) ; var style = options . compile ( str , stylusPath ) ; var paths = style . options . _imports = [ ] ; imports [ stylusPath ] = null ; style . render ( function ( err , css ) { if ( err ) return next ( err ) ; debug ( 'render %s' , stylusPath ) ; imports [ stylusPath ] = paths ; mkdir ( dirname ( cssPath ) , { mode : parseInt ( '0700' , 8 ) , recursive : true } , function ( err ) { if ( err ) return error ( err ) ; fs . writeFile ( cssPath , css , 'utf8' , next ) ; } ) ; } ) ; } ) ; }
Compile to cssPath
Compile to cssPath