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

makemail

v0.0.13

Published

CLI + utilities for bulletproof email development and testing

Downloads

17

Readme

makemail

makemail currently only supports building template with mjml and handlebars. Check out the examples section for more info.

Installation

npm install makemail

Usage

CLI

Create a makemail.yml config file

makemail init

Run on root dir

makemail dev

Run a specific folder - good for separating workspaces with different makemail.yml configs.

makemail dev my-folder/

Or tell makemail where to look for input files

makemail dev -f my-other-folder/src

Compile all files for production

makemail prod

Compile a specific file for production

makemail prod -f my-folder/index.mjml

All options

$ makemail --help
Usage: makemail [options] [command]

CLI for makemail

Options:
  -V, --version                        output the version number
  -v --verbose                         verbose output
  -f --files <files>                   comma separated list of globs
  -w --watch                           watch for changes
  --settings <file>                    set settings file
  -s --src <dir>                       set src dir
  -i --input <files>                   comma separated list of input file globs
  -o --output <dir>                    set output dir
  -l --locales <locales>               comma separated list of locales
  -D --delete-out-dir                  delete the output directory before
                                       compiling
  -b --browser-sync                    start browser-sync
  -B --browser-sync-options <options>  browser-sync options
  --no-open                            do not open browser-sync window on start
  --port <port>                        browser-sync port
  --start-path <startPath>             browser-sync start path
  -u, --upload                         upload files and assets to s3 if not
                                       already uploaded
  --force-upload                       force upload assets to s3 (even if they
                                       already exist)
  --bucket <bucket>                    s3 bucket
  --region <region>                    s3 region
  --omit-default-locale                omit the default locale from the file
                                       name
  --env-path <path>                    path to .env file
  -h, --help                           display help for command

Commands:
  init                                 step-by-step setup a new project
  dev [workspace]                      compile templates to html
  prod [workspace]                     compile templates to html, minify,
                                       inline css, etc.
  help [command]                       display help for command


# The above was auto-generated by running `./repo.mjs run`

Handlebars

Available helpers:

`t`
 description: used to output the correct text based on the locale
 usage: {{t "hello" "hola" "bonjour"}}

// The above was auto-generated by running `./repo.mjs run`

Examples

Check out the example project in example/

Developing

From root...

npm install

Then run one of these:

# from package.json 'scripts'
npm run compile         # Compile the source code
npm run compile:watch   # Compile the source code and watch for changes
npm run test            # Run the tests (todo)
npm run prepare         # runs: `husky install`

# The above was auto-generated by running `./repo.mjs run`

Repo.mjs

There are bunch of scripts in here that aid in developing docs and doing other chores. It is called in a pre-commit hook.

Misc.

Special shoutouts:

To-do:

  • [x] prettier/eslint config for consistency
  • [ ] Test with not-exact image sizes
  • [ ] Docker
  • [ ] Use workspace name to create bucket
  • [ ] .env file should be discoverable even when workspace is set in cli args
  • [ ] BUG: const getContentType = await $file --mime-type ${filePath} | cut -d' ' -f2 doesn't work if there are spaces in the file path

Roadmap:

  • [x] parse yaml frontmatter in templates for handlebars/mjml config + context
  • [x] i18n config
  • [ ] prod/preview script
    • [x] upload html file to s3 + replace URLS in template
    • [x] upload assets to S3 + replace URLS in template
    • [ ] resize assets
    • [ ] with flag, upload html to EmailOnAcid/Litmus + return URL to test on all screens (pending API approval for testing)