Coder Social home page Coder Social logo

gulp-footer's Introduction

The canonical location of this project is now gulp-community/gulp-footer.

gulp-footer NPM version Build Status

gulp-footer is a Gulp extension to add a footer to file(s) in the pipeline. Gulp is a streaming build system utilizing node.js.

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

API

footer(text, data)

text

Type: String
Default: ''

The template text.

data

Type: Object
Default: {}

The data object used to populate the text.

Usage

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

gulp.src('./foo/*.js')
  .pipe(footer('Hello'))
  .pipe(gulp.dest('./dist/')

gulp.src('./foo/*.js')
  .pipe(footer('Hello <%= name %>\n', { name : 'World'} ))
  .pipe(gulp.dest('./dist/')

gulp.src('./foo/*.js')
  .pipe(footer('Hello ${name}\n', { name : 'World'} ))
  .pipe(gulp.dest('./dist/')


//
var pkg = require('./package.json');
var banner = ['/**',
  ' * <%= pkg.name %> - <%= pkg.description %>',
  ' * @version v<%= pkg.version %>',
  ' * @link <%= pkg.homepage %>',
  ' * @license <%= pkg.license %>',
  ' */',
  ''].join('\n');

//passing in the text
gulp.src('./foo/*.js')
  .pipe(footer(banner, { pkg : pkg } ))
  .pipe(gulp.dest('./dist/')

//reading from a file for the text
var bannerText = fs.readFileSync('banner.js');

/*********************************************/
//If you want the text from a file...
var fs = require('fs');
var banner = fs.readFileSync('banner.txt');

gulp-footer's People

Contributors

basa0 avatar marcabonce-vidado avatar selected-pixel-jameson avatar shinnn avatar simonua avatar tracker1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gulp-footer's Issues

TODO: Update dependencies

need to update various dependencies as well as change lodash reference to use the lodash package with lodash/template as the specific import.

lodash.assign dependency

Hi, any chance you can replace lodash.assign dependency with object-assign as in gulp-header - I'm having problems using it on Windows (too much subfolders in lodash.assign and Windows doesn't like more than 260 characters). Thanks.

Replace deprecated dependency gulp-util

Replace deprecated dependency gulp-util

gulp-util has been deprecated recently. Continuing to use this dependency may prevent the use of your library with the recently released version 4 of Gulp, it is important to replace gulp-util.

The README.md lists alternatives for all the components so a simple replacement should be enough.

Your package is popular but still relying on gulp-util, it would be good to publish a fixed version to npm as soon as possible.

See:

Package Dependency Issue in Version 1

The issue with the lodash dependency is still in version 1. It appears as though the update got pushed out to version 1 as well as version 2. The package dependency issue is a problem with version 1 still. If you could please fix it as soon as possible it would be greatly appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.