{"id":16226223,"url":"https://github.com/antony/svelte-typescript","last_synced_at":"2026-01-20T06:01:04.733Z","repository":{"id":49623334,"uuid":"275442005","full_name":"antony/svelte-typescript","owner":"antony","description":"Trying out official Svelte TypeScript support","archived":false,"fork":false,"pushed_at":"2022-07-21T03:46:43.000Z","size":72,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T19:54:20.996Z","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/antony.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":"2020-06-27T19:42:41.000Z","updated_at":"2020-06-28T13:50:37.000Z","dependencies_parsed_at":"2022-08-31T21:21:18.324Z","dependency_job_id":null,"html_url":"https://github.com/antony/svelte-typescript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/antony/svelte-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony%2Fsvelte-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony%2Fsvelte-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony%2Fsvelte-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony%2Fsvelte-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antony","download_url":"https://codeload.github.com/antony/svelte-typescript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony%2Fsvelte-typescript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28597087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: 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":[],"created_at":"2024-10-10T12:48:31.053Z","updated_at":"2026-01-20T06:01:04.686Z","avatar_url":"https://github.com/antony.png","language":"JavaScript","readme":"_Looking for a shareable component template? Go here --\u003e [sveltejs/component-template](https://github.com/sveltejs/component-template)_\n\n---\n\n# svelte app\n\nThis is a project template for [Svelte](https://svelte.dev) apps with typescript. It lives at https://github.com/dummdidumm/template.\n\nTo create a new project based on this template using [degit](https://github.com/Rich-Harris/degit):\n\n```bash\nnpx degit dummdidumm/template svelte-typescript-app\ncd svelte-typescript-app\n```\n\n_Note that you will need to have [Node.js](https://nodejs.org) installed._\n\n## Get started\n\nInstall the dependencies...\n\n```bash\ncd svelte-app\nnpm install\n```\n\n...then start [Rollup](https://rollupjs.org):\n\n```bash\nnpm run dev\n```\n\nNavigate to [localhost:5000](http://localhost:5000). You should see your app running. Edit a component file in `src`, save it, and reload the page to see your changes.\n\nBy default, the server will only respond to requests from localhost. To allow connections from other computers, edit the `sirv` commands in package.json to include the option `--host 0.0.0.0`.\n\n## Building and running in production mode\n\nTo create an optimised version of the app:\n\n```bash\nnpm run build\n```\n\nYou can run the newly built app with `npm run start`. This uses [sirv](https://github.com/lukeed/sirv), which is included in your package.json's `dependencies` so that the app will work when you deploy to platforms like [Heroku](https://heroku.com).\n\n## Single-page app mode\n\nBy default, sirv will only respond to requests that match files in `public`. This is to maximise compatibility with static fileservers, allowing you to deploy your app anywhere.\n\nIf you're building a single-page app (SPA) with multiple routes, sirv needs to be able to respond to requests for _any_ path. You can make it so by editing the `\"start\"` command in package.json:\n\n```js\n\"start\": \"sirv public --single\"\n```\n\n## Differences to the javascript version\n\n- Following npm packages are added: `svelte-preprocess typescript tslib @rollup/plugin-typescript`\n- A `tsconfig.json` is added\n- `rollup.config.js` is enhanced:\n\n```js\n// ...\nimport sveltePreprocess from 'svelte-preprocess';\nimport typescript from '@rollup/plugin-typescript';\n\n// ...\n  plugins: [\n    svelte({\n      // ...\n      preprocess: sveltePreprocess(), // \u003c--\n    }),\n\n    // ...\n    commonjs(),\n    typescript(), // \u003c-- added below commonjs\n    // ...\n```\n\n## Deploying to the web\n\n### With [now](https://zeit.co/now)\n\nInstall `now` if you haven't already:\n\n```bash\nnpm install -g now\n```\n\nThen, from within your project folder:\n\n```bash\ncd public\nnow deploy --name my-project\n```\n\nAs an alternative, use the [Now desktop client](https://zeit.co/download) and simply drag the unzipped project folder to the taskbar icon.\n\n### With [surge](https://surge.sh/)\n\nInstall `surge` if you haven't already:\n\n```bash\nnpm install -g surge\n```\n\nThen, from within your project folder:\n\n```bash\nnpm run build\nsurge public my-project.surge.sh\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantony%2Fsvelte-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantony%2Fsvelte-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantony%2Fsvelte-typescript/lists"}