{"id":13441162,"url":"https://github.com/cvzi/rollup-userscript-template","last_synced_at":"2025-04-10T00:17:19.895Z","repository":{"id":37970028,"uuid":"306980733","full_name":"cvzi/rollup-userscript-template","owner":"cvzi","description":"Bundle javascript, typescript, react and JSX/TSX script files into a single userscript file with rollup","archived":false,"fork":false,"pushed_at":"2024-12-16T11:14:40.000Z","size":1002,"stargazers_count":49,"open_issues_count":5,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T00:17:13.718Z","etag":null,"topics":["rollup","tampermonkey-userscript","typescript","userscript"],"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/cvzi.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},"funding":{"github":"cvzi","ko_fi":"cuzicvzi","liberapay":"cuzi","custom":["https://bandcamp.com/cuzi/wishlist","https://buymeacoff.ee/cuzi","https://live.blockcypher.com/btc/address/3KDs3RjvsKzbFQ8XoHkGqZxQtSxn2WYbn1/"],"patreon":"cuzi"}},"created_at":"2020-10-24T22:14:30.000Z","updated_at":"2024-11-04T18:56:13.000Z","dependencies_parsed_at":"2024-01-16T20:25:13.212Z","dependency_job_id":"ee875855-ca62-43ca-bc8c-5e288cc18c70","html_url":"https://github.com/cvzi/rollup-userscript-template","commit_stats":{"total_commits":130,"total_committers":2,"mean_commits":65.0,"dds":0.4,"last_synced_commit":"a2bae8619672749a1ec4ebc5de1913fc589521a9"},"previous_names":[],"tags_count":15,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvzi%2Frollup-userscript-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvzi%2Frollup-userscript-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvzi%2Frollup-userscript-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvzi%2Frollup-userscript-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cvzi","download_url":"https://codeload.github.com/cvzi/rollup-userscript-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131318,"owners_count":21052820,"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":["rollup","tampermonkey-userscript","typescript","userscript"],"created_at":"2024-07-31T03:01:30.629Z","updated_at":"2025-04-10T00:17:19.866Z","avatar_url":"https://github.com/cvzi.png","language":"JavaScript","readme":"# rollup-userscript-template\n\nThis is a template repository for a userscript.\nIt bundles typescript, react and JSX/TSX script files into a single userscript file with [rollup](https://rollupjs.org/)\n\n## Features:\n*   Bundle everything into a single userscript files in [dist/bundle.user.js](dist/bundle.user.js)\n*   Typescript support\n*   React support\n*   JSX/TSX support\n*   Metablock generation from [package.json](package.json) and [meta.json](meta.json) with [rollup-plugin-userscript-metablock](https://github.com/FlandreDaisuki/rollup-plugin-userscript-metablock)\n*   Development script in [dist/dev.user.js](dist/dev.user.js). Automatically fetches the newest version on F5\n*   Source map support\n\n## Installation\n\nClone the repository and install dependencies with npm\n```sh\ngit clone git@github.com:cvzi/rollup-userscript-template.git\ncd rollup-userscript-template\nnpm install\n```\n\n## Usage\n\n### Bundle\n\nBundle everything from `src/` into `dist/bundle.user.js`:\n\n`npm run build`\n\nor\n\n`npx rollup --config`\n\n\n### Development server\n`npm run serve`\n\nor\n\n`node -r esm server.js`\n\nThis will automatically update `dist/bundle.user.js` when code changes and serve it on [localhost:8124](http://localhost:8124/).\n\nIt also creates a second userscript `dist/dev.user.js`, if you install it in Tampermonkey, it will automatically fetch the latest version from http://localhost:8124/bundle.user.js once you reload a website with F5.\n\n\n### Bundle without source map\n\nBundle for publishing without sourcemapping to `dist/release-3.2.1.user.js`\n\n`npm run build:release`\n\nor on Windows\n\n`npm run build:release:win32`\n\n\n## Other\n\n*   Typescript types for GM.* object are incomplete. See [types/GM/index.d.ts](types/GM/index.d.ts)\n*   Currently react is not bundled, but imported with @require. To bundle it, remove `output.globals` and `external` from [rollup.config.mjs](rollup.config.mjs)\n","funding_links":["https://github.com/sponsors/cvzi","https://ko-fi.com/cuzicvzi","https://liberapay.com/cuzi","https://bandcamp.com/cuzi/wishlist","https://buymeacoff.ee/cuzi","https://live.blockcypher.com/btc/address/3KDs3RjvsKzbFQ8XoHkGqZxQtSxn2WYbn1/","https://patreon.com/cuzi"],"categories":["HarmonyOS","Starter Templates"],"sub_categories":["Windows Manager","Upload Assistant"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvzi%2Frollup-userscript-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcvzi%2Frollup-userscript-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvzi%2Frollup-userscript-template/lists"}