This is the web inliner used on the Foundation for Emails marketing site. The files generated here are copied to the Foundation marketing site codebase.
index.js has DOM-specific functions that leverage the web inliner's guts. It should be Browserified to run in the browser. lib/inline.js is the inliner itself, and can be run in Node.
Inline the contents of html, along with any code inside css.
Type: String
HTML to inline.
Type: String
CSS to inline into HTML.
Type: Object
compress(Boolean): Compress final HTML output.onSuccess(Function): Callback to run when inlining is done. Includes anhtmlparameter with the output.onError(Function): Callback to run if there's an error. Includes anerrparameter with the error.
git clone https://github.com/zurb/web-inliner
cd web-inliner
npm installRun npm start to start the build process. A new JavaScript bundle will be generated each time you save index.js.
Run npm run build to generate a compressed bundle. Use this compressed file on the Foundation marketing site.