Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@christianhugoch/bootstrap-email-with-node-sass-7
Advanced tools
This is a fork: Convert a bootstrap-like template into email-compatible table layout
If you know Bootstrap, you know Bootstrap Email.
This is a fork from bootstrap-email. Based on the original Bootstrap Email by stuyam, this library allows you to compile a regular HTML markdown with usual Bootstrap classes into cringy table-based email-layouts ... with JAVASCRIPT 🎉🎊✨.
{color} in these examples is primary
, secondary
, success
, warning
, danger
, light
, and dark
.alert
, .alert-{color}
.badge
, .badge-{color}
, .badge-pill
.btn
, .btn-{color}
, .btn-outline-{color}
.card
, .card-body
.text-{color}
, .bg-{color}
.container
, .container-fluid
.float-left
, .float-right
.row
, .col-{1-12}
, .col-lg-{1-12}
<hr>
.p{tlbrxy}-{lg-}{0-5}
, .m{tby}-{lg-}{0-5}
, mx-auto
w-{lg-}{25,50,75,100}
.table
, .table-striped
,.table-bordered
, .thead-light
, .thead-dark
, .table-{color}
, .table-dark
<h1>
, <h2>
, <h3>
, <h4>
, <h5>
, <h6>
, <strong>
, <u>
, <em>
, <s>
, .text-{sm|lg-}left
, .text-{sm|lg-}center
, .text-{sm|lg-}right
, .display-{1-4}
, .lead
, .small
.d-desktop
, .d-mobile
Install package with npm i bootstrap-email -S
To compile a default template:
const BootstrapEmail = require('bootstrap-email');
const template = new BootstrapEmail('<absolute-path-to-template>.html');
// const template = new BootstrapEmail([
// '<absolute-path-to-first-template>.html',
// '<absolute-path-to-second-template>.html',
// ]);
//
// const template = new BootstrapEmail('<div class="container">...</div>');
template.compileAndSave('<absolute-path-to-output>.html');
Alternatively use the Gulp plugin to integrate Bootstrap Email into your templating workflow.
style
string (optional) - Path to css or scss file, which should be inlined. Default is bootstrap-email.scss
head
string (optional) - Path to css or scss file, which should be injected to head
. Default is head.scss
templates
array<string> - Array with paths to html files you want to compile.logLevel
Performs a full compile and returns compiled document(s).
If only one template is about to compile, returns the compiled template, otherwise an array containing objects with the path of the input-file and the compiled document.
const singleTemplate = new BootstrapEmail('<absolute-path-to-template>.html');
// returns string
singleTemplate.compile();
const multipleTemplates = new BootstrapEmail(['<absolute-path>', ...]);
// returns [{path:'<absolute-path-to-source>', document: '...'}, ...]
multipleTemplates.compile();
Performs a full compile and saves compiled files into given path.
If only one template is given, pass a full path including filename and extension. Otherwise pass only a directory name. The filenames will be used from the source files.
const singleTemplate = new BootstrapEmail('<absolute-path-to-template>.html');
singleTemplate.compileAndSave('<absolute-out-compiled>.html');
const multipleTemplates = new BootstrapEmail(['<absolute-path>', ...]);
multipleTemplates.compileAndSave('<absolute-out>');
:hover
, :focus
, ...)FAQs
This is a fork: Convert a bootstrap-like template into email-compatible table layout
We found that @christianhugoch/bootstrap-email-with-node-sass-7 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.