gulp-banner

A gulp plugin to insert a comment (or other string) at the top of the file

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
gulp-banner
500.1.37 years ago7 years agoMinified + gzip package size for gulp-banner in KB

Readme

gulp-banner
A gulp plugin to insert a comment (or other string) at the top of the file.

Build Status !NPM versionnpm-imagenpm-url !Downloadsdownloads-imagenpm-url
gulp-banner
Installation
npm install gulp gulp-banner --save-dev
Quick Start
var gulp = require('gulp');
var banner = require('gulp-banner');
var pkg = require('./package.json');

var comment = '/*\n' +
    ' * <%= pkg.name %> <%= pkg.version %>\n' +
    ' * <%= pkg.description %>\n' +
    ' * <%= pkg.homepage %>\n' +
    ' *\n' +
    ' * Copyright 2015, <%= pkg.author %>\n' +
    ' * Released under the <%= pkg.license %> license.\n' +
    '*/\n\n';

gulp.task('taskName', function() {
    gulp.src('path/to/example.js')
        .pipe(banner(comment, {
            pkg: pkg
        }))
        .pipe(gulp.dest('dist'));
});
Testing
npm test
License
MIT, see the LICENSE file for detail.