salter

1.1.4 • Public • Published

salter

A command line utility that generates ascii-font headers.

npm install -g salter

It watches for changes to source files in (or below) a given directory.

When a file change occurs it searches for special comment lines, eg:

#!! salt 

... and replaces them with something like this:

###
 0000000   0000000   000      000000000
000       000   000  000         000   
0000000   000000000  000         000   
     000  000   000  000         000   
0000000   000   000  0000000     000   
###

Defaults

Currently, the following file types are handled by default:

  • coffee, js, ts
  • styl, jade
  • h, cpp
  • noon
  • py

The default marker for coffee, python and noon files is: #>
For all other file types: //>

Configuration

On startup, salter looks for configuration files in your home directory and/or the target directory: .salter.noon or .salter.json

For example, a .salter.noon file that adds handling of html files could look like this:

html
    marker      >>
    prefix      <!--
    postfix     --!>

or, if you prefer json:

{
    "html": {
        "marker": ">>",
        "prefix": "<!--",
        "postfix": "-->"
    }
}

Package Sidebar

Install

npm i salter

Weekly Downloads

3

Version

1.1.4

License

Unlicense

Last publish

Collaborators

  • monsterkodi