gulp-salt

gulp plugin that inserts ascii headers


Keywords
gulp, ascii, text, header, minimap
License
Unlicense
Install
npm install gulp-salt@0.9.3

Documentation

gulp-salt

generates ascii-font headers 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   
###

when it discovers special comment lines:

#!! salt

it is most useful when attached to a watch:

gulpfile.coffee

gulp = require 'gulp'
salt = require 'gulp-salt'

gulp.task 'default', ->        
    gulp.watch ['**/*.coffee'], (e) -> 
        gulp.src e.path, base: './'
        .pipe salt()
        .pipe gulp.dest '.'

it keeps the indentation level intact and you can configure the comment format for different file types:

default config

coffee: 
    marker:  '#!!'
    prefix:  '###'
    postfix: '###'
styl: 
    marker:  '//!'
    prefix:  '/*'
    fill:    '*  '
    postfix: '*/'

This stuff works for me, but I won't guarantee that it works for you as well. Use at your own risk!

npm