{"id":16791979,"url":"https://github.com/metonym/svelte-rollup-template","last_synced_at":"2025-07-08T21:36:29.358Z","repository":{"id":45744622,"uuid":"206208364","full_name":"metonym/svelte-rollup-template","owner":"metonym","description":"Svelte Rollup template with file name hashing and HTML minification","archived":false,"fork":false,"pushed_at":"2024-08-30T20:31:05.000Z","size":469,"stargazers_count":27,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-27T17:16:38.558Z","etag":null,"topics":["hash","minification","minify","posthtml","rollup","svelte","svelte-rollup-template","template"],"latest_commit_sha":null,"homepage":"https://metonym.github.io/svelte-rollup-template/","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/metonym.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":"2019-09-04T01:56:23.000Z","updated_at":"2024-08-30T20:30:05.000Z","dependencies_parsed_at":"2023-01-30T22:30:46.263Z","dependency_job_id":"af0df132-0335-447e-8515-0eaaee40fc93","html_url":"https://github.com/metonym/svelte-rollup-template","commit_stats":null,"previous_names":[],"tags_count":21,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metonym%2Fsvelte-rollup-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metonym%2Fsvelte-rollup-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metonym%2Fsvelte-rollup-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metonym%2Fsvelte-rollup-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metonym","download_url":"https://codeload.github.com/metonym/svelte-rollup-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841204,"owners_count":20356441,"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":["hash","minification","minify","posthtml","rollup","svelte","svelte-rollup-template","template"],"created_at":"2024-10-13T08:43:44.030Z","updated_at":"2025-03-17T03:30:38.897Z","avatar_url":"https://github.com/metonym.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# svelte-rollup-template\n\n\u003e Svelte Rollup template with file name hashing and HTML minification.\n\nThis template supplements the official [Svelte Rollup template](https://github.com/sveltejs/template) by hashing CSS/JS file names when building for production.\n\nThis set-up is a solution for a [GitHub issue about hashing file names](https://github.com/sveltejs/template/issues/39). See [rollup.config.js](rollup.config.js) for how this is done.\n\n```diff\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n    \u003ctitle\u003eSvelte Rollup Template\u003c/title\u003e\n-   \u003clink rel=\"stylesheet\" href=\"bundle.[hash].css\"\u003e\n+   \u003clink rel=\"stylesheet\" href=\"bundle.8cafcc832f6eac1fd04a.css\"\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n-   \u003cscript src=\"bundle.[hash].js\"\u003e\u003c/script\u003e\n+   \u003cscript src=\"bundle.f03bbb7cae8df0138056.js\"\u003e\u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nThis project uses [PostHTML](https://github.com/posthtml/posthtml) to process compiled assets after the build stage.\n\n## Quick Start\n\nScaffold a new project using [degit](https://github.com/Rich-Harris/degit):\n\n```bash\nnpx degit metonym/svelte-rollup-template svelte-app\ncd svelte-app\nnpm install\n```\n\n## Available Scripts\n\n### `npm run dev`\n\nRuns the app in development mode. Visit [http://localhost:3000](http://localhost:3000) to view the app.\n\nCustomize the port number in [rollup.config.js](rollup.config.js#L47).\n\n```diff\nserve({\n  contentBase: [OUT_DIR],\n- port: 3000\n+ port: 8080\n})\n```\n\n### `npm run build`\n\nBuilds the app for production.\n\nThe output is written to the `build` directory. This folder should not be committed to version control.\n\n[PostHTML](https://github.com/posthtml/posthtml) is executed in a [custom Rollup plugin](rollup.config.js#L16) that taps into the `writeBundle` hook.\n\n[posthtml-hash](https://github.com/posthtml/posthtml-hash) hashes the filenames of `bundle.css` and `bundle.js`.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetonym%2Fsvelte-rollup-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetonym%2Fsvelte-rollup-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetonym%2Fsvelte-rollup-template/lists"}