{"name":"gulp-header","version":"2.0.10","keywords":["header","gulpplugin","eventstream"],"author":{"url":"http://github.com/tracker1","name":"Michael J. Ryan","email":"tracker1@gmail.com"},"license":"MIT","_id":"gulp-header@2.0.10","maintainers":[{"name":"tracker1","email":"tracker1@gmail.com"},{"name":"yocontra","email":"yo@contra.io"}],"contributors":[{"url":"http://github.com/godaddy","name":"GoDaddy.com"},{"url":"http://github.com/douglasduteil","name":"Douglas Duteil","email":"douglasduteil@gmail.com"}],"homepage":"https://github.com/gulp-community/gulp-header#readme","bugs":{"url":"https://github.com/gulp-community/gulp-header/issues"},"dist":{"shasum":"362114a91d437e3500dbc6abeddeb5c9de90daac","tarball":"http://registry-npm.ywwl.com/gulp-header/download/gulp-header-2.0.10.tgz","fileCount":8,"integrity":"sha512-yH/sLrFyPOr5hIlpTYsZELYSyLLJQpDfeys28K2Bb1fstpVmMS0N0agceXoAe5I0ipdYKpzk4gsSy8EPMLGY3w==","signatures":[{"sig":"MEUCIGEZjl2Vedqr/9KVo8m25kt64j5OyX81c26gCAiYoG8wAiEA9TFxgaBRX4tZRguqQ26yOeL9jNGunz8N7vaCnlPtudE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10267,"size":4215,"noattachment":false,"key":"/gulp-header/-/gulp-header-2.0.10.tgz"},"main":"./index.js","proxy":null,"gitHead":"661d83d8663642150c6149bef741e72fd56b30c8","scripts":{"test":"jest --coverage","publish-major":"npm version major && git push origin master && git push --tags","publish-minor":"npm version minor && git push origin master && git push --tags","publish-patch":"npm version patch && git push origin master && git push --tags"},"_npmUser":{"name":"tracker1","email":"tracker1@gmail.com"},"prettier":{"parser":"babel","useTabs":false,"tabWidth":2,"printWidth":100,"singleQuote":true,"trailingComma":"es5","jsxBracketSameLine":true},"repository":{"url":"git://github.com/gulp-community/gulp-header.git","type":"git"},"_npmVersion":"11.8.0","description":"Gulp extension to add header to file(s) in the pipeline.","directories":{"test":"test"},"https-proxy":null,"_nodeVersion":"24.13.0","dependencies":{"jest":"^25.1.0","lodash":"^4.17.21","through2":"^2.0.0","map-stream":"0.0.7","concat-with-sourcemaps":"^1.1.0"},"jshintConfig":{"node":true,"mocha":true,"undef":true,"strict":"implied","unused":true,"esversion":8},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.0","vinyl":"*","should":"*"},"_npmOperationalInternal":{"tmp":"tmp/gulp-header_2.0.10_1771629172194_0.22892310032146335","host":"s3://npm-registry-packages-npm-production"},"readme":"The canonical location of this project is now [gulp-community/gulp-header](https://github.com/gulp-community/gulp-header).\n\n# gulp-header\n\n[![npm version](https://img.shields.io/github/package-json/v/gulp-community/gulp-header)](https://www.npmjs.com/package/gulp-header)\n[![Actions Status](https://github.com/gulp-community/gulp-header/workflows/Tests/badge.svg)](https://github.com/gulp-community/gulp-header/actions)\n[![Code Coverage](https://img.shields.io/coveralls/github/gulp-community/gulp-header)](https://github.com/gulp-community/gulp-header)\n[![Dependency Status](https://img.shields.io/librariesio/release/npm/gulp-header)](https://libraries.io/npm/gulp-header)\n![Github Issues](https://img.shields.io/github/issues/gulp-community/gulp-header?style=plastic) \n[![MIT License](https://img.shields.io/github/license/gulp-community/gulp-header)](./LICENSE)\n\ngulp-header is a [Gulp](https://github.com/gulpjs/gulp) extension to add a header to file(s) in the pipeline.  [Gulp is a streaming build system](https://github.com/gulpjs/gulp) utilizing [node.js](http://nodejs.org/).\n\n## Install\n\n```javascript\nnpm install --save-dev gulp-header\n```\n\n## Usage\n\n```javascript\n// assign the module to a local variable\nvar header = require('gulp-header');\n\n\n// literal string\n// NOTE: a line separator will not be added automatically\ngulp.src('./foo/*.js')\n  .pipe(header('Hello'))\n  .pipe(gulp.dest('./dist/'))\n\n\n// ejs style templating\ngulp.src('./foo/*.js')\n  .pipe(header('Hello <%= name %>\\n', { name : 'World'} ))\n  .pipe(gulp.dest('./dist/'))\n\n\n// ES6-style template string\ngulp.src('./foo/*.js')\n  .pipe(header('Hello ${name}\\n', { name : 'World'} ))\n  .pipe(gulp.dest('./dist/'))\n\n\n// using data from package.json\nvar pkg = require('./package.json');\nvar banner = ['/**',\n  ' * <%= pkg.name %> - <%= pkg.description %>',\n  ' * @version v<%= pkg.version %>',\n  ' * @link <%= pkg.homepage %>',\n  ' * @license <%= pkg.license %>',\n  ' */',\n  ''].join('\\n');\n\ngulp.src('./foo/*.js')\n  .pipe(header(banner, { pkg : pkg } ))\n  .pipe(gulp.dest('./dist/'))\n\n\n// reading the header file from disk\nvar fs = require('fs');\ngulp.src('./foo/*.js')\n  .pipe(header(fs.readFileSync('header.txt', 'utf8'), { pkg : pkg } ))\n  .pipe(gulp.dest('./dist/'))\n\n\n// for use with coffee-script\nreturn gulp.src([\n        'src/*.coffee',\n    ])\n    .pipe(header(banner, { pkg : pkg } ))\n    .pipe(sourcemaps.init()) // init sourcemaps *after* header\n    .pipe(coffee({\n        bare: true\n    }))\n    .pipe(sourcemaps.write('.'))\n    .pipe(gulp.dest('dist/js'))\n```\n\n## Issues and Alerts\n\nMy handle on twitter is [@tracker1](https://twitter.com/tracker1) - If there is an urgent issue, I get twitter notifications sent to my phone.\n\n## API\n\n### header(text, data)\n\n#### text\n\nType: `String`\nDefault: `''`\n\nThe template text.\n\n\n#### data\n\nType: `Object`\nDefault: `{}`\n\nThe data object used to populate the text.\n\nIn addition to the passed in data, `file` will be the [stream object](https://github.com/gulpjs/vinyl#instance-properties) for the file being templated against and `filename` will be the path relative from the stream's basepath.\n\n*NOTE: using `false` will disable template processing of the header*\n","publish_time":1771629172339,"_cnpm_publish_time":1771629172339,"dist-tags":{"latest":"2.0.12"}}