node package manager
Don’t reinvent the wheel. Reuse code within your team. Create a free org »

posthtml-style-expansion

PostHTML-Style-Expansion

PostHTML plugin expand link rel="stylesheet".

Usage

const posthtml = require('posthtml')
 
posthtml([require('posthtml-style-expansion')({ root: './', encoding: 'utf-8' })])
  .process('<link expand="true" href="/path/index.css" rel="stylesheet">')
  .then( result => console.log(result.html))

Options

root: Root folder

encoding: Default utf-8