New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-header-license

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-header-license

Gulp extension to add license to file(s) in the pipeline.

  • 1.0.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
201
decreased by-55.43%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-header-license NPM version

License plugin for Gulp. gulp-header-license is a Gulp extension to add a header license to file(s) in the pipeline.

Install

npm install gulp-header-license --save-dev

Basic Usage

Something like this will add license to your file(s):

var gulp = require("gulp");
var license = require('gulp-header-license');

gulp.task('license', function () {
    var year = (new Date()).getFullYear();
    gulp.src('./assets/**/*.js')
            .pipe(license('Copyright (c) ${year}, B3log.org', {year: year}))
            .pipe(gulp.dest('./public/'));
});

You can also use header.txt, doing something like this:

'use strict';

var gulp = require("gulp");
var license = require('gulp-header-license');
var fs = require('fs');

gulp.task('license', function () {
    var year = (new Date()).getFullYear();
    gulp.src('./assets/**/*.js')
            .pipe(license(fs.readFileSync('header.txt', 'utf8'), {year: year}, 0.9))
            .pipe(gulp.dest('./public/'));
});

Options

license:String

The license template string.

config:JSON

The JSON object used to populate the license template.

rate:Float, default value is 0.8.

Less then this rate, add license, otherwise update license.

Keywords

FAQs

Package last updated on 27 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc