npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

email-designer

v0.0.4

Published

Zero-Dependencies Tool to create HTML emails in a modular and simple way

Downloads

68

Readme

Install

if you are using Yarn:

yarn add email-designer

if you are using NPM:

npm i email-designer

Usage

This module comes to provide a solution to the problem of non-dynamism or dependence on developers when designing new email templates.

using email-designer can find dynamism and ease for the developer to send new emails with easy and simple structures to adjust when programming.

🍋 easy peasy lemon squeezy

This service will be a module in which we can pass a JSON that describes the structure we want for our new email, as well as the data in between. In response, we will receive an HTML of our email.

Ejemplo:

// let import email designer
const emailDesigner = require('email-desginer')

/**
 * la estructura es simplemente una lista de bloques/componente
 * y cada bloque/componente es descripto con un JSON.
 *
 * El email-HTML se genera siguiendo el orden del array
 */
const blocks = [
	{
		name: "base/logo",
		params: {
			url: 'https://image.com/logo.png',
			maxHeight: '80px'
		}
	},
	{
		name: "base/title",
		params: {
			title: 'Buenos Dias',
			subtitle: 'Argentina'
		}
	},
	{
		name: 'juanson/otp-code' // al ser un proyecto open-source, otros usuarios pueden aportar de sus diseños al proyecto
		params: {
			code: '123 456'
		}
	},
	{
		name: 'base/footer',
		params: {
			title: 'adios',
			text: 'gracias por leer este email'
		}
	},
	{
		name: 'base/social media',
		params: {
			twitter: '@franidev',
			discord: '@frani'
		}
	}
]

const HTML = emailDesginer.createHTML({ blocks })
await sendEmail(HTML)

// OR change email options

const options = {
	backgroundColor: '#dddddd'
}

const emailHTML = emailDesginer.createHTML({ blocks, options })
await sendEmail(emailHTML)

PR with your Block !

Use block sample in /blocks/sample to start to create your block

Everyone can create their own block and add it to mail-designer repo!

You can add your block or design as you like. Simply add a folder with the name you prefer and within it, your components.

Wabout Templates ?

pos claro! miralos como una funcion que create un HTML con una seria de blocks y data ya predefinida y solo hay que cambiar info!