{"id":28566444,"url":"https://github.com/js-devtools/browserify-banner","last_synced_at":"2025-08-25T03:49:45.751Z","repository":{"id":57122436,"uuid":"73381679","full_name":"JS-DevTools/browserify-banner","owner":"JS-DevTools","description":"Add a banner (comment and/or code) to the top of your Browserify bundle","archived":false,"fork":false,"pushed_at":"2020-07-16T11:48:43.000Z","size":462,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-14T16:59:42.746Z","etag":null,"topics":["banner","browserify","browserify-plugin","copyright","header","license"],"latest_commit_sha":null,"homepage":"https://jstools.dev/browserify-banner/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JS-DevTools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-10T12:52:19.000Z","updated_at":"2024-05-08T20:08:32.000Z","dependencies_parsed_at":"2022-08-24T14:59:30.100Z","dependency_job_id":null,"html_url":"https://github.com/JS-DevTools/browserify-banner","commit_stats":null,"previous_names":["bigstickcarpet/browserify-banner"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/JS-DevTools/browserify-banner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fbrowserify-banner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fbrowserify-banner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fbrowserify-banner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fbrowserify-banner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JS-DevTools","download_url":"https://codeload.github.com/JS-DevTools/browserify-banner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fbrowserify-banner/sbom","scorecard":{"id":69166,"data":{"date":"2025-08-11","repo":{"name":"github.com/JS-DevTools/browserify-banner","commit":"54d39a4d3accc7dfffd009fe8d82418cb2c6bd8c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/CI-CD.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI-CD.yaml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/JS-DevTools/browserify-banner/CI-CD.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI-CD.yaml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/JS-DevTools/browserify-banner/CI-CD.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI-CD.yaml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/JS-DevTools/browserify-banner/CI-CD.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI-CD.yaml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/JS-DevTools/browserify-banner/CI-CD.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI-CD.yaml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/JS-DevTools/browserify-banner/CI-CD.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI-CD.yaml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/JS-DevTools/browserify-banner/CI-CD.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI-CD.yaml:93: update your workflow using https://app.stepsecurity.io/secureworkflow/JS-DevTools/browserify-banner/CI-CD.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI-CD.yaml:104: update your workflow using https://app.stepsecurity.io/secureworkflow/JS-DevTools/browserify-banner/CI-CD.yaml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   2 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"47 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-wg6g-ppvx-927h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-15T03:24:33.809Z","repository_id":57122436,"created_at":"2025-08-15T03:24:33.809Z","updated_at":"2025-08-15T03:24:33.809Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272004325,"owners_count":24856937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["banner","browserify","browserify-plugin","copyright","header","license"],"created_at":"2025-06-10T15:10:58.860Z","updated_at":"2025-08-25T03:49:45.739Z","avatar_url":"https://github.com/JS-DevTools.png","language":"JavaScript","readme":"Browserify Banner\n============================\n#### Add a comment (and/or code) to the top of your Browserify bundle\n\n[![Cross-Platform Compatibility](https://jstools.dev/img/badges/os-badges.svg)](https://github.com/JS-DevTools/browserify-banner/actions)\n[![Build Status](https://github.com/JS-DevTools/browserify-banner/workflows/CI-CD/badge.svg)](https://github.com/JS-DevTools/browserify-banner/actions)\n\n[![Coverage Status](https://coveralls.io/repos/github/JS-DevTools/browserify-banner/badge.svg?branch=master)](https://coveralls.io/github/JS-DevTools/browserify-banner?branch=master)\n[![Dependencies](https://david-dm.org/JS-DevTools/browserify-banner.svg)](https://david-dm.org/JS-DevTools/browserify-banner)\n\n[![npm](https://img.shields.io/npm/v/@jsdevtools/browserify-banner.svg)](https://www.npmjs.com/package/@jsdevtools/browserify-banner)\n[![License](https://img.shields.io/npm/l/@jsdevtools/browserify-banner.svg)](LICENSE)\n[![Buy us a tree](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-lightgreen)](https://plant.treeware.earth/JS-DevTools/browserify-banner)\n\n\n\nFeatures\n--------------------------\n* Customize your banner text using [Lodash templates](https://lodash.com/docs/4.16.6#template) and [Moment.js](http://momentjs.com/)\n* Inject any value from your package.json file into the banner\n* Include JavaScript code to be run before your bundle is loaded\n* Works with source maps (Browserify's `--debug` option)\n\n\n\nExample\n--------------------------\nHere's an example banner template (can be in a file, passed via command-line, or set programmatically):\n\n```\n\u003c%= _.startCase(pkg.name) %\u003e v\u003c%= pkg.version %\u003e (\u003c%= moment().format('MMMM Do YYYY') %\u003e)\n\u003c%= pkg.description %\u003e\n\n\u003c%= pkg.homepage %\u003e\n\n@author  \u003c%= pkg.author.name %\u003e (\u003c%= pkg.author.url %\u003e)\n@license \u003c%= pkg.license %\u003e\n```\n\nAnd here's what the banner would look like at the top of the Browserify bundle:\n\n```javascript\n/*!\n * My Library v1.23.456 (November 24th 2016)\n * Lorem ipsum dolor sit amet, consectetur adipiscing malesuada ac elit.\n *\n * http://mycompany.com/my-library\n *\n * @author  John Doe (http://linkedin.com/john-doe)\n * @license MIT\n */\n```\n\n\n\nRelated Projects\n--------------------------\n* [globify](https://www.npmjs.com/package/globify) - Run browserify and watchify with globs - even on Windows\n* [sourcemapify](https://www.npmjs.com/package/sourcemapify) - Sourcemap plugin for Browserify\n* [simplifyify](https://www.npmjs.com/package/simplifyify) - A simplified Browserify and Watchify CLI\n\n\nInstallation\n--------------------------\nInstall using [npm](https://docs.npmjs.com/getting-started/what-is-npm):\n\n```bash\nnpm install @jsdevtools/browserify-banner\n```\n\n\n\nUsage\n--------------------------\n### Command Line\nIf used without any options, then it will automatically search for a file named \"banner.txt\".\n\n```bash\nbrowserify -p @jsdevtools/browserify-banner\n```\n\nOr you can use Browserify's sub-argument command-line syntax to specify a different file:\n\n```bash\nbrowserify -p [ @jsdevtools/browserify-banner --file src/license.txt ]\n```\n\nOr you can specify the banner template directly:\n\n```bash\nbrowserify -p [ @jsdevtools/browserify-banner --template \"\u003c%= pkg.name %\u003e v\u003c%= pkg.version %\u003e\" ]\n```\n\n### Browserify API\nUse the plugin programmatically like this:\n\n```javascript\nvar browserify = require('browserify');\nvar banner = require('@jsdevtools/browserify-banner');\n\nbrowserify({debug: true})\n  .plugin(banner, {\n    // Custom object to use instead of the package.json file\n    pkg: {\n      name: 'My Library',\n      version: '1.23.456',\n      author: {\n        name: 'John Doe'\n      }\n    },\n\n    // Path to template file (defaults to \"banner.txt\")\n    file: 'path/to/my/banner/file.txt',\n\n    // Or just set the template directly (will be wrapped in a comment block)\n    template: '\u003c%= pkg.name %\u003e v\u003c%= pkg.version %\u003e\\n' +\n              '\u003c%= moment().format('MMMM Do YYYY') %\u003e',\n\n    // Or set the banner directly (will NOT be wrapped in a comment block)\n    banner: '// This banner is NOT a template, so \u003c%= this.doesnt.do.anything %\u003e.\\n' +\n            '// But I can inject custom code at the top of the bundle...\\n' +\n            'window.myCustomVariable = Date.now();\\n'\n  })\n  .bundle()\n  .pipe(fs.createWriteStream('bundle.js', 'utf8'));\n```\n\n\n\nOptions\n--------------------------\n#### `file` (string)\nThe path of a file to load the banner template from.  The contents of this file are read and assigned to the `template` option. By default, Browserify Banner will search for a file named \"banner.txt\", starting in the directory of your bundle's entry file, and crawling up the directory tree from there.\n\n#### `package` (string or object)\nThe path of the package.json file to apply to the banner template.  Or you can set it to an object that will be applied as-is to the template.  By default, Browserify Banner will use the first package.json file that is loaded by Browserify, which is usually the one associated with your bundle's entry file.\n\n#### `template` (string)\nA [Lodash template](https://lodash.com/docs/4.16.6#template) that will be used to create your bundle's banner. By default, this property is automatically set to the contents of the `file` option, but if you set `template` option, then it overrides the `file` option.\n\nThis template can use `\u003c%= code.blocks %\u003e` to inject variables into the banner. The template has access to the package.json file (e.g. `pkg.name`, `pkg.version`, etc). It also has access to all [Lodash methods](https://lodash.com/docs/4.16.6) (e.g. `_.filter()`, `_.map()`, etc.) and the [Moment.js](http://momentjs.com/) library (e.g. `moment.format()`, `moment().startOf()`, etc).\n\n__Note:__ The template will automatically be wrapped in a comment block, unless it already starts with a comment.  If your template contains JavaScript code that you want to be executed at the top of your bundle, then make sure that you start your code with a comment.\n\n#### `banner` (string)\nIf this option is set, then all other options are ignored and this banner is injected as-is at the top of your bundle. No modification is made to this text, so it's up to you to make sure that it contains valid comments and/or code.\n\n\nContributing\n--------------------------\nContributions, enhancements, and bug-fixes are welcome!  [Open an issue](https://github.com/JS-DevTools/browserify-banner/issues) on GitHub and [submit a pull request](https://github.com/JS-DevTools/browserify-banner/pulls).\n\n#### Building\nTo build the project locally on your computer:\n\n1. __Clone this repo__\u003cbr\u003e\n`git clone https://github.com/JS-DevTools/browserify-banner.git`\n\n2. __Install dependencies__\u003cbr\u003e\n`npm install`\n\n3. __Link the module to itself__ (so Browserify can find the plugin)\u003cbr\u003e\n`npm link`\u003cbr\u003e\n`npm link @jsdevtools/browserify-banner`\n\n4. __Run the tests__\u003cbr\u003e\n`npm test`\n\n\n\nLicense\n--------------------------\nBrowserify Banner is 100% free and open-source, under the [MIT license](LICENSE). Use it however you want.\n\nThis package is [Treeware](http://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/JS-DevTools/browserify-banner) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.\n\n\n\nBig Thanks To\n--------------------------\nThanks to these awesome companies for their support of Open Source developers ❤\n\n[![Travis CI](https://jstools.dev/img/badges/travis-ci.svg)](https://travis-ci.com)\n[![SauceLabs](https://jstools.dev/img/badges/sauce-labs.svg)](https://saucelabs.com)\n[![Coveralls](https://jstools.dev/img/badges/coveralls.svg)](https://coveralls.io)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-devtools%2Fbrowserify-banner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjs-devtools%2Fbrowserify-banner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-devtools%2Fbrowserify-banner/lists"}