Skip to content

Add optional string input to api's#13

Open
jaymarnz wants to merge 1 commit intomahhov:masterfrom
jaymarnz:apiStringInput
Open

Add optional string input to api's#13
jaymarnz wants to merge 1 commit intomahhov:masterfrom
jaymarnz:apiStringInput

Conversation

@jaymarnz
Copy link
Copy Markdown

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));

This allows the API's to be chained without having to create temp files. See the changes to the API section of the readme for examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant