Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
bootstrap-email_with-node-sass-6
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
The npm package bootstrap-email_with-node-sass-6 receives a total of 19 weekly downloads. As such, bootstrap-email_with-node-sass-6 popularity was classified as not popular.
We found that bootstrap-email_with-node-sass-6 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.