Skip to content

Instantly share code, notes, and snippets.

@Munter
Created June 19, 2014 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Munter/5a0efe677d39f626121f to your computer and use it in GitHub Desktop.
Save Munter/5a0efe677d39f626121f to your computer and use it in GitHub Desktop.
Inline your CSS into your HTML-pages
new AssetGraph({ root: 'path/to/website' })
.loadAssets('index.html')
.populate({
followRelations: Assetgraph.query.or({
type: 'HtmlStyle'
},
{
type: 'HtmlAnchor',
hrefType: ['relative', 'rootRelative']
}
})
.inlineRelations({ type: 'HtmlStyle' })
.writeAssetsToDisc();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment