Skip to content

jnordling/gulp-tattoo

Repository files navigation

gulp-tattoo Build Status

Tattoo your code with image-ascii and license A great way to brand you code and add project wide comments to your code

Install

$ npm install --save-dev gulp-tattoo

Basic Usage

var asciiArt = '

   _____       _          _______    _   _               \n\
  / ____|     | |        |__   __|  | | | |              \n\
 | |  __ _   _| |_ __ ______| | __ _| |_| |_ ___   ___   \n\
 | | |_ | | | | | '_ \______| |/ _` | __| __/ _ \ / _ \  \n\
 | |__| | |_| | | |_) |     | | (_| | |_| || (_) | (_) | \n\
  \_____|\__,_|_| .__/      |_|\__,_|\__|\__\___/ \___/  \n\
                | |                                      \n\
                |_|                                    \n\

';
var gulp = require('gulp');
var tattoo = require('gulp-tattoo');

gulp.task('default', function () {
	return gulp.src('src/index.html')
		.pipe(tattoo(asciiArt))
		.pipe(gulp.dest('dist'));
});

Use a File

var gulp = require('gulp');
var tattoo = require('gulp-tattoo');

var asciiArt = fs.readFileSync('header.txt', 'utf8')

gulp.task('default', function () {
	return gulp.src('src/index.html')
		.pipe(tattoo(asciiArt))
		.pipe(gulp.dest('dist'));
});

Use Parameters & Templates

var gulp = require('gulp');
var tattoo = require('gulp-tattoo');

// Get contents from package.json to use in the tempate
var pkg = require('./package.json');

var asciiArt = fs.readFileSync('header.txt', 'utf8'), { pkg : pkg } )

gulp.task('default', function () {
	return gulp.src('src/index.html')
		.pipe(tattoo(asciiArt))
		.pipe(gulp.dest('dist'));
});

API

tattoo(options)

options

foo

Type: boolean
Default: false

Lorem ipsum.

License

MIT © Jon Nordling

About

A node module for stamping/tattooing you code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published