Scow is an HTML email inliner and bundler designed to prepare modern HTML and CSS for consistent rendering across a diverse range of email clients. Historically, email clients exhibit inconsistent support for external stylesheets and `<style>` tags within the `<head>` of an HTML document, often stripping them entirely. This necessitates that CSS be applied directly as `style` attributes on individual HTML elements for reliable presentation. Scow automates this critical inlining process, abstracting away the complexities of email client rendering quirks. Additionally, it aims to bundle associated assets like images, potentially converting them to data URIs. Currently available as `4.0.0-alpha.5`, the package is undergoing active alpha development, meaning its API and feature set are subject to change without strict adherence to semantic versioning until a stable release. Its core value lies in streamlining the email development workflow, ensuring that visually rich emails display as intended, despite the varied and often outdated rendering engines used by different email services and applications.
npm install scowVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use `scow` to inline CSS styles from a `<style>` block in an HTML email template directly into the HTML elements' `style` attributes, preparing it for various email clients. It also shows basic error handling.
Always pin to an exact alpha version (e.g., `"scow": "4.0.0-alpha.5"`) and regularly check the project's GitHub repository for API updates and migration guides before upgrading.
Thoroughly test all inlined email templates across multiple email clients and devices (e.g., using Litmus or Email on Acid) to ensure consistent rendering. Design emails with a 'lowest common denominator' approach, favoring widely supported CSS properties.
Ensure all external assets (images, fonts, etc.) are hosted on publicly accessible URLs. Use the `baseUrl` configuration option if your HTML template uses relative paths that need to be resolved against a specific base URL for asset bundling.
Always use `import { ... } from 'scow';` for module loading. If encountering issues in a CommonJS environment, ensure your project is configured for dual ESM/CJS support or use dynamic `import()` for ESM-only packages.No dependency data recorded yet.