{"id":13774866,"url":"https://github.com/kpulkit29/rollup-plugin-concatfiles","last_synced_at":"2025-05-11T07:30:48.131Z","repository":{"id":42885176,"uuid":"222391669","full_name":"kpulkit29/rollup-plugin-concatfiles","owner":"kpulkit29","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-06T03:20:40.000Z","size":1346,"stargazers_count":5,"open_issues_count":14,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-09T22:38:58.240Z","etag":null,"topics":["concat","content","files","rollup","rollup-plugin","rollup-plugin-concat"],"latest_commit_sha":null,"homepage":null,"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/kpulkit29.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2019-11-18T07:49:53.000Z","updated_at":"2023-03-09T02:40:18.000Z","dependencies_parsed_at":"2023-02-05T05:01:19.098Z","dependency_job_id":null,"html_url":"https://github.com/kpulkit29/rollup-plugin-concatfiles","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/kpulkit29%2Frollup-plugin-concatfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpulkit29%2Frollup-plugin-concatfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpulkit29%2Frollup-plugin-concatfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpulkit29%2Frollup-plugin-concatfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kpulkit29","download_url":"https://codeload.github.com/kpulkit29/rollup-plugin-concatfiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253533096,"owners_count":21923362,"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":["concat","content","files","rollup","rollup-plugin","rollup-plugin-concat"],"created_at":"2024-08-03T17:01:31.070Z","updated_at":"2025-05-11T07:30:47.867Z","avatar_url":"https://github.com/kpulkit29.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Output"],"readme":"# rollup-plugin-concatfiles\n\n[![Build Status](https://travis-ci.com/kpulkit29/rollup-plugin-concatFiles.svg?branch=master)](https://travis-ci.com/kpulkit29/rollup-plugin-concatFiles)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nRollup plugin to concatenate files/content to the generated output. This plugin would enable the user to concatenate files to the output or any other file in general.\n\n## Install\n\n``` \n// yarn\nyarn add rollup-plugin-concatfiles\n\n// npm\nnpm i rollup-plugin-concatfiles\n```\n\n## Usage\n\n```javascript\n// rollup.config.js\nimport {concatFiles} from \"rollup-plugin-concatfiles\";\nexport default [\n  {\n    input: \"testUtils/core.js\",\n    output: {\n      file: \"dist/test-1.js\",\n      format: \"iife\",\n      sourceMap: true\n    },\n    plugins: [\n      concatFiles({\n        files: {\n            \"dist/test-1.js\": {\n              banner:[\"Add your banner content\"],\n              concatFiles:['license.txt', 'dist/test-1.js'],\n              footer:[\"Add your footer content\"]\n            },\n            \"dist/temp.js\": {\n              banner:[SOME_FILE_PATH],\n              concatFiles:['src/core.js'],\n              footer:[SOME_FILE_PATH]\n            }\n        }\n      })\n    ]\n  }\n];\n```\n\nIn the above mentioned example ```dist/test-1.js``` will be the output generated by rollup and concatFiles plugin will accumulate all the content mentioned under the **files** key \u0026 dump that into ```dist/test-1.js```. **IMPORTANT**: Old content will be replaced with the concatenated content.\n\n**rollup-plugin-concatfiles can be used to modify content of build file as well as other files.**\n\n**Note**: Banner can be an array of normal strings or file paths (in the form of string) or both. Similarly for footer.\n\nConcatenation order for the above example\n\ncontent in ```dist/test-1.js``` = Banner + license.txt + dist/test-1.js + Footer\n\ncontent in ```dist/temp.js``` = Banner + src/core.js + Footer\n\n## Configuration and other features\n\n**Files**\n\nTYPE:  ```Object```\n\nEach key in this object should be a valid filename(.js extension supported) to which concatenated content will be saved.\n\n**Banner**\n\nTYPE:  ```Array```\n\nBanner would be at the top of the content. Should be passed on as an empty array if you do not want to use this key. \n\n**Footer**\n\nTYPE:  ```Array```\n\nFooter would be at the bottom of the content. Should be passed on as an empty array if you do not want to use this key.\n\n### Other features\n- Default separator is ```\\n```. Cannot be altered as of now.\n- Banner can be an array of normal strings or file paths (in the form of string) or both. Similarly for footer.\n- Currently the plugin is capable of reading of .txt or .js files and can only generate output in .js file\n\n## Contributors\n\u003cdiv style=\"display:flex;\"\u003e\n\u003cimg src=\"https://avatars1.githubusercontent.com/u/20151526?s=460\u0026u=76fea093f6afafa2fadee858e58bfde8ca83279b\u0026v=4\" width=\"15%\"\u003e\n\u003cimg src=\"https://avatars1.githubusercontent.com/u/29947862?s=400\u0026v=4\" width=\"15%\"\u003e\n \u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpulkit29%2Frollup-plugin-concatfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkpulkit29%2Frollup-plugin-concatfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpulkit29%2Frollup-plugin-concatfiles/lists"}