inline-scripts
inline-scripts copied to clipboard
Add optional string input to api's
This adds an optional string input to each of the APIs so they can be chained without having to create temp files:
inlineScriptTags('./index.html') .then (htmlString => inlineStylesheets({ htmlPath: './index.html', htmlString })) .then (htmlString => inlineImages({ htmlPath: './index.html', htmlString })) .then (htmlString => fs.writeFileSync('./dist/index.html', htmlString));