{"name":"gulp-header","version":"2.0.12","description":"Gulp extension to add header to file(s) in the pipeline.","main":"./src/index.js","repository":{"type":"git","url":"git://github.com/gulp-community/gulp-header.git"},"keywords":["header","gulpplugin","eventstream"],"author":{"name":"Michael J. Ryan","email":"tracker1@gmail.com","url":"http://github.com/tracker1"},"contributors":[{"name":"GoDaddy.com","url":"http://github.com/godaddy"},{"name":"Douglas Duteil","email":"douglasduteil@gmail.com","url":"http://github.com/douglasduteil"}],"license":"MIT","bugs":{"url":"https://github.com/gulp-community/gulp-header/issues"},"dependencies":{"concat-with-sourcemaps":"^1.1.0","lodash":"^4.17.21","map-stream":"^0.0.7","through2":"^4.0.2"},"devDependencies":{"chai":"^6.2.2","gulp":"^5.0.1","vinyl":"*"},"scripts":{"test":"node --experimental-test-coverage --test","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"},"gitHead":"041163cdde145586103381e86d06702e6d6ca17a","_id":"gulp-header@2.0.12","homepage":"https://github.com/gulp-community/gulp-header#readme","_nodeVersion":"24.13.0","_npmVersion":"11.10.1","dist":{"integrity":"sha512-7PFW56tRISOroZ3N5R+f1Bn4wvdtE5LZXfZqz4ubEAXLEsLS7kSifgsk/lF26hSqnYO786GniQCxCuLxQZ0SoA==","shasum":"5f1f51748e1c07152413b00fd4cb4c77dde595dd","tarball":"http://registry-npm.ywwl.com/gulp-header/download/gulp-header-2.0.12.tgz","fileCount":5,"unpackedSize":8238,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/gulp-header@2.0.12","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICL/36v3J4A4C7w7//xegk1zHhrTthKoq30bNNWh2vaeAiAPhNKISUd17pJp7iWqaXmU47T+nEjf/0Yrj0xA5kE98Q=="}],"size":3481,"noattachment":false,"key":"/gulp-header/-/gulp-header-2.0.12.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:89eac410-c5d5-48ee-9d89-636d277b16ba"}},"directories":{},"maintainers":[{"name":"tracker1","email":"tracker1@gmail.com"},{"name":"yocontra","email":"yo@contra.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gulp-header_2.0.12_1771632360030_0.090806067938489"},"_hasShrinkwrap":false,"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":1771632360188,"_cnpm_publish_time":1771632360188,"dist-tags":{"latest":"2.0.12"}}