{"id":18774218,"url":"https://github.com/leny/banye","last_synced_at":"2025-12-14T06:30:17.147Z","repository":{"id":57126764,"uuid":"343072463","full_name":"leny/banye","owner":"leny","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-20T09:12:12.000Z","size":52,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T08:42:32.980Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leny.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-28T10:04:14.000Z","updated_at":"2023-03-08T05:08:36.000Z","dependencies_parsed_at":"2022-08-31T12:10:48.003Z","dependency_job_id":null,"html_url":"https://github.com/leny/banye","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leny%2Fbanye","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leny%2Fbanye/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leny%2Fbanye/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leny%2Fbanye/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leny","download_url":"https://codeload.github.com/leny/banye/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239680988,"owners_count":19679509,"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","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":[],"created_at":"2024-11-07T19:37:45.202Z","updated_at":"2025-12-14T06:30:17.110Z","avatar_url":"https://github.com/leny.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @leny/banye\n\n\u003e Add dynamic header comments to files - cleaned/updated version of [misteroneill/bannerize](https://github.com/misteroneill/bannerize)\n\n* * *\n\n## Banner Templates\n\nBanner templates use the [EJS](https://www.npmjs.com/package/ejs) templating language. Templates are passed the following properties:\n\n- `pkg`: A representation of the nearest `package.json` file.\n- `date`: A JavaScript Date object.\n- `path`: Relate path of the file.\n\nA simple banner might look something like:\n\n```\n/*! \u003c%= pkg.name %\u003e | \u003c%= pkg.version %\u003e\n *  (c) \u003c%= date.getFullYear() %\u003e\n */\n```\n\nAnd render to:\n\n```\n/*! @leny/banye | 1.0.0\n *  (c) 2021 MIT\n */\n```\n\n## CLI\n\n`banye` ships with a CLI command. Its options vary from the programmatic API. To see all its options, use:\n\n```sh\n$ banye --help\n```\n\nAn example usage might look like:\n\n```sh\n$ banye *.js *.css --banner=foo/bar.ejs\n```\n\n## API\n\nThe `banye ` module can be used in your programs. It exports a single function, `banye `, which takes two arguments:\n\n### `banye(patterns, [options])`\n\n- `pattern` `{String|Array}`: A string or array of glob pattern(s) to which to apply the banner.\n- `[options]` `{Object}`: An object containing optional values.\n\nThe return value of `bannerize()` is a `Promise` that resolves with an array of all the file paths it modified.\n\n### Options\n\n- `banner` A banner file location. Defaults to `banner.ejs` in the `cwd`.\n\n- `cwd` Override the `cwd` for all paths passed to `bannerize`. Relative paths will be relative to `process.cwd()`. Defaults to `process.cwd()`.\n  \n- `lineBreak` Sets the linebreak (`'CRLF'`, `'LF'`). Defaults to `'LF'`.\n\n- `replace` Replace the starting lines of the files (up to the first empty line) with the banner\n\n- `check` Check if header already exists in good format before add or replace","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleny%2Fbanye","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleny%2Fbanye","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleny%2Fbanye/lists"}