Skip to main content

Premail internal structure

  • index.js uses yargs to pass tasks and other functions to the premail command.
  • gulpfile.js defines tasks for gulp. Not all Premail functions are gulp tasks, for instance premail init and premail destroy are referenced directly from index.js and don't run through gulp.
  • Dotfiles should be self-explanatory.
  • docs contains (mirrored) project docs from this documentation site. They are included at this path in order to be accessible to GitHub.
  • src contains the program itself.
    • config functions load and process configuration from command-line, internal, and user-facing file sources.
    • scaffolding contains:
    • helpers are small utility functions, usually from other sources, that don't rely on anything specific to Premail to run.
    • ops are a kind of catch-all internal function category: error handling, file copying, console notification and variable validation.
    • settings are internal default settings for Premail, stored in YAML format.
    • tasks correspond to premail commands. Some of these are gulp tasks, and some are just Node JS files.
  • contains basic project documentation.
Premail documentation repository

The repo for this site (, which is built with Docusaurus, is in its own GitHub repo: premail/website.