{"id":13774797,"url":"https://github.com/yingye/rollup-plugin-banner","last_synced_at":"2025-04-12T17:34:17.654Z","repository":{"id":30379189,"uuid":"157076386","full_name":"yingye/rollup-plugin-banner","owner":"yingye","description":"Rollup plugin to append content before js bundle.","archived":false,"fork":false,"pushed_at":"2023-01-03T15:19:04.000Z","size":583,"stargazers_count":16,"open_issues_count":16,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-11T17:21:29.222Z","etag":null,"topics":["banner","license","rollup","rollup-plugin"],"latest_commit_sha":null,"homepage":"","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/yingye.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":"2018-11-11T12:17:01.000Z","updated_at":"2024-02-04T11:04:48.000Z","dependencies_parsed_at":"2023-01-14T16:51:43.494Z","dependency_job_id":null,"html_url":"https://github.com/yingye/rollup-plugin-banner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yingye%2Frollup-plugin-banner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yingye%2Frollup-plugin-banner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yingye%2Frollup-plugin-banner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yingye%2Frollup-plugin-banner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yingye","download_url":"https://codeload.github.com/yingye/rollup-plugin-banner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248605450,"owners_count":21132174,"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":["banner","license","rollup","rollup-plugin"],"created_at":"2024-08-03T17:01:30.433Z","updated_at":"2025-04-12T17:34:17.621Z","avatar_url":"https://github.com/yingye.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Output"],"readme":"# rollup-plugin-banner\n\n[![Build Status](https://travis-ci.org/yingye/rollup-plugin-banner.svg?branch=master)](https://travis-ci.org/yingye/rollup-plugin-banner)\n[![npm version](https://badge.fury.io/js/rollup-plugin-banner.svg)](https://badge.fury.io/js/rollup-plugin-banner)\n[![change-log](https://img.shields.io/badge/changelog-md-blue.svg)](https://github.com/yingye/rollup-plugin-banner/blob/master/CHANGELOG.md)\n\n## Introduction\n\nRollup plugin to append content before js bundle.\n\nThe difference between this plugin and the output.banner parameter provided by the rollup is that the banner will not be cleaned up. For example, your project uses the rollup-plugin-uglify plugin, the output file will not contain the output.banner parameter you set. So you need rollup-plugin-banner to solve this problem.\n\n## Usage\n\nInstall the plugin with NPM:\n\n```\nnpm install --save-dev rollup-plugin-banner\n```\n\nAdd it to your rollup configuration:\n\n```js\nimport banner from 'rollup-plugin-banner'\n\nexport default {\n  plugins: [\n    banner('rollup-plugin-banner v\u003c%= pkg.version %\u003e by\u003c%= pkg.author %\u003e')\n  ]\n}\n\n```\n\n## API\n\nbanner(options)\n\n### options\n\nType: String / Object\n\n#### String\n\nInput:\n\n```\nbanner('rollup-plugin-banner v\u003c%= pkg.version %\u003e by \u003c%= pkg.author %\u003e')\n```\n\nOutput:\n\n```\n// rollup-plugin-banner v0.1.0 by yingye\n```\n\nThe pkg is the content of the project package.json.\n\nIf your text is multi-line, you can use '\\n'.\n\n```\nbanner('rollup-plugin-banner\\nv\u003c%= pkg.version %\u003e\\nby \u003c%= pkg.author %\u003e')\n```\n\noutput:\n\n```\n/**\n* rollup-plugin-banner\n* v0.1.0\n* by yingye\n*/\n```\n\n#### Object\n\n```\nbanner({\n  file: path.join(__dirname, 'banner.txt')，\n  encoding: 'utf-8' // default is utf-8\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyingye%2Frollup-plugin-banner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyingye%2Frollup-plugin-banner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyingye%2Frollup-plugin-banner/lists"}