{"id":18358873,"url":"https://github.com/uppercod/rollup-pack","last_synced_at":"2025-04-10T03:04:53.970Z","repository":{"id":44993600,"uuid":"190486668","full_name":"UpperCod/rollup-pack","owner":"UpperCod","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-03T12:28:32.000Z","size":170,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-15T18:36:42.616Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/UpperCod.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":"2019-06-06T00:18:29.000Z","updated_at":"2020-01-20T03:21:30.000Z","dependencies_parsed_at":"2023-01-23T05:00:30.485Z","dependency_job_id":null,"html_url":"https://github.com/UpperCod/rollup-pack","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/UpperCod%2Frollup-pack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Frollup-pack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Frollup-pack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Frollup-pack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UpperCod","download_url":"https://codeload.github.com/UpperCod/rollup-pack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248148228,"owners_count":21055547,"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-05T22:19:46.996Z","updated_at":"2025-04-10T03:04:53.934Z","avatar_url":"https://github.com/UpperCod.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rollup-pack\n\nThis is a bundle prefiguration for [Rollup](https://rollupjs.org) that allows to generate code for the browser in MJS format and to know its cost in size.\n\nThe process is simple and is done thanks to [@atomico/rollup-plugin-input-html](https://github.com/atomicojs/rollup-plugin-input-html)\n\n1. the existing html files in the root are analyzed.\n2. it extracts the local script of the modules type, from the html files.\n3. Bundles are generated for each one based on the name of the HTML file. eg: `ui-button.html` will be `ui-button.js`.\n\nthrough the process 2 bundle directories are generated:\n\n1. `./dist`: copy the html and all its dependencies thanks to [rollup-plugin-node-resolve](https://github.com/rollup/rollup-plugin-node-resolve) and [@atomico/rollup-plugin-input-html](https://github.com/atomicojs/rollup-plugin-input-html).\n2. `./lib` : copy alone the js of export.\n\nIn both formats the cost of each bundle is taught thanks to [@atomico/rollup-plugin-sizes](https://github.com/atomicojs/rollup-plugin-sizes).\n\n## Use\n\n```js\nimport pack from \"@atomico/rollup-pack\";\n\nexport default pack(\"*.html\" /**,optionalConfig **/);\n```\n\n## default configuration\n\n```js\nlet ignoreLog = [\"CIRCULAR_DEPENDENCY\", \"UNRESOLVED_IMPORT\"];\n\nlet defaultOptions = {\n\tdirDist: \"./dist\",\n\tdirDemo: \"./lib\",\n\tminifyDist: !isDev,\n\tminifyDemo: !isDev,\n\tshowSizes: !isDev,\n\tplugins: [],\n\tpluginsDist: [],\n\tpluginsDemo: [],\n\tonwarn(message) {\n\t\tif (ignoreLog.indexOf(message.code) \u003e -1) return;\n\t\tconsole.error(message);\n\t}\n};\n```\n\n## By default the configuration works thanks to the plugins.\n\n1. [rollup-plugin-node-resolve](https://github.com/rollup/rollup-plugin-node-resolve)\n2. [rollup-plugin-terser](https://github.com/TrySound/rollup-plugin-terser)\n3. [@atomico/rollup-plugin-input-html](https://github.com/atomicojs/rollup-plugin-input-html)\n4. [@atomico/rollup-plugin-sizes](https://github.com/atomicojs/rollup-plugin-sizes)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuppercod%2Frollup-pack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuppercod%2Frollup-pack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuppercod%2Frollup-pack/lists"}