{"id":26026031,"url":"https://github.com/lazycoffee/lc-bun-plugin","last_synced_at":"2026-05-05T10:33:12.077Z","repository":{"id":280775650,"uuid":"943072872","full_name":"lazycoffee/lc-bun-plugin","owner":"lazycoffee","description":"Some useful plugins for bun bundler.","archived":false,"fork":false,"pushed_at":"2025-03-06T03:40:37.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-24T19:43:48.374Z","etag":null,"topics":["bun","bundler","less"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/lc-bun-plugin","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/lazycoffee.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-05T05:57:06.000Z","updated_at":"2025-03-06T03:40:40.000Z","dependencies_parsed_at":"2025-03-05T16:08:08.184Z","dependency_job_id":null,"html_url":"https://github.com/lazycoffee/lc-bun-plugin","commit_stats":null,"previous_names":["lazycoffee/less-bun-plugin","lazycoffee/bun-less-plugin","lazycoffee/bun-plugin-less","lazycoffee/lc-bun-plugin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lazycoffee/lc-bun-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazycoffee%2Flc-bun-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazycoffee%2Flc-bun-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazycoffee%2Flc-bun-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazycoffee%2Flc-bun-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lazycoffee","download_url":"https://codeload.github.com/lazycoffee/lc-bun-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazycoffee%2Flc-bun-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30081041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T12:28:08.313Z","status":"ssl_error","status_checked_at":"2026-03-04T12:27:28.210Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bun","bundler","less"],"created_at":"2025-03-06T14:31:56.346Z","updated_at":"2026-03-04T13:00:33.167Z","avatar_url":"https://github.com/lazycoffee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lc-bun-plugin\n\nSome useful plugins for bun bundler.\n\n-   bunPluginLess - A less compiler plugin\n-   bunPluginHtml - Use one html template for multi entry points\n-   bunPluginSvg - Import svg as raw string\n\n## Usage\n\nJust use it like any other bun plugin.\n\n```js\nimport { bunPluginLess, bunPluginHtml, bunPluginSvg } from \"lc-bun-plugin\";\nimport path from \"path\";\n\nasync function main() {\n    const BunPluginLess = bunPluginLess({\n        sourceMap: { sourceMapFileInline: true },\n        // extra config: https://lesscss.org/usage/#programmatic-usage\n    });\n    const buildConfig = {\n        // bunPluginHtml not support .html as entry point\n        // you can use .js or .mjs\n        entrypoints: [\"./index.js\"],\n        outdir: \"./dist\",\n        plugins: [BunPluginLess, bunPluginSvg()],\n    };\n    const { outputs } = await Bun.build();\n    // has to be called after bun.build()\n    bunPluginHtml({\n        templatePath: path.join(process.cwd(), \"front/template.html\"),\n        // I need to known the output path to inject the bundle path\n        outputs,\n        // I also need to known the build config to inject built assets\n        buildConfig,\n    });\n}\nmain();\n```\n\nOr you can find an example in 'playground/build.mjs';\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazycoffee%2Flc-bun-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flazycoffee%2Flc-bun-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazycoffee%2Flc-bun-plugin/lists"}