lib/polymerize.js
function inlineStylesheet($, filepath) {
  $('link[rel=stylesheet][href]').each(function() {
    var el      = $(this);
    var href    = el.attr('href');
    if(ABS.test(href)) return;
    var relpath = /^\./.test(href) ? href : './' + href;
    var srcpath = resolve.sync(relpath, {
      basedir    : dirname(filepath),
      extensions : [extname(relpath)]
    })
    var content = read(srcpath);
    var style = whacko('<style>' + content + '</style>');
    style.attr(el.attr());
    style.attr('href', null);
    style.attr('rel', null);
    el.replaceWith(whacko.html(style));
  })
}
function inlineStylesheet($, filepath) {
  $('link[rel=stylesheet][href]').each(function() {
    var el      = $(this);
    var href    = el.attr('href');
    if(ABS.test(href)) return;
    var relpath = /^\./.test(href) ? href : './' + href;
    var srcpath = resolve.sync(relpath, {
      basedir    : dirname(filepath),
      extensions : [extname(relpath)]
    })
    var content = read(srcpath);
    var style = whacko('<style>' + content + '</style>');
    style.attr(el.attr());
    style.attr('href', null);
    style.attr('rel', null);
    el.replaceWith(whacko.html(style));
  })
}
function inlineStylesheet ( $ , filepath ) { $ ( 'link[rel=stylesheet][href]' ) . each ( function ( ) { var el = $ ( this ) ; var href = el . attr ( 'href' ) ; if ( ABS . test ( href ) ) return ; var relpath = / ^\. / . test ( href ) ? href : './' + href ; var srcpath = resolve . sync ( relpath , { basedir : dirname ( filepath ) , extensions : [ extname ( relpath ) ] } ) var content = read ( srcpath ) ; var style = whacko ( '<style>' + content + '</style>' ) ; style . attr ( el . attr ( ) ) ; style . attr ( 'href' , null ) ; style . attr ( 'rel' , null ) ; el . replaceWith ( whacko . html ( style ) ) ; } ) }
Inline external css sources

@param {Object} $
Whacko document

@return {Array}
Inline external css sources