{"id":22961992,"url":"https://github.com/actionanand/svelte-store","last_synced_at":"2026-04-29T15:33:54.924Z","repository":{"id":44773355,"uuid":"451751205","full_name":"actionanand/svelte-store","owner":"actionanand","description":"It's a svelte practice repo for data management and store","archived":false,"fork":false,"pushed_at":"2022-01-25T17:31:11.000Z","size":333,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-31T14:18:25.679Z","etag":null,"topics":["svelte","svelte-store","svelte-stores","sveltejs"],"latest_commit_sha":null,"homepage":"https://actionanand.github.io/svelte-store/","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/actionanand.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":"2022-01-25T05:47:06.000Z","updated_at":"2022-01-25T17:19:30.000Z","dependencies_parsed_at":"2022-08-29T00:50:34.460Z","dependency_job_id":null,"html_url":"https://github.com/actionanand/svelte-store","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/actionanand/svelte-store","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionanand%2Fsvelte-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionanand%2Fsvelte-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionanand%2Fsvelte-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionanand%2Fsvelte-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actionanand","download_url":"https://codeload.github.com/actionanand/svelte-store/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionanand%2Fsvelte-store/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32431698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"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":["svelte","svelte-store","svelte-stores","sveltejs"],"created_at":"2024-12-14T19:14:45.203Z","updated_at":"2026-04-29T15:33:54.907Z","avatar_url":"https://github.com/actionanand.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"*Psst — looking for a more complete solution? Check out [SvelteKit](https://kit.svelte.dev), the official framework for building web applications of all sizes, with a beautiful development experience and flexible filesystem-based routing.*\n\n*Looking for a shareable component template instead? You can [use SvelteKit for that as well](https://kit.svelte.dev/docs#packaging) or the older [sveltejs/component-template](https://github.com/sveltejs/component-template)*\n\n---\n\n# Svelte Store\n\nThis is a mini project using Svelte template.\n\nTo create a new project based on this template using [degit](https://github.com/Rich-Harris/degit):\n\n```bash\nnpx degit sveltejs/template svelte-app\ncd svelte-app\n```\n\n*Note that you will need to have [Node.js](https://nodejs.org) installed.*\n\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:8080](http://localhost:8080). 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\nIf you're using [Visual Studio Code](https://code.visualstudio.com/) we recommend installing the official extension [Svelte for VS Code](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode). If you are using other editors you may need to install a plugin in order to get syntax highlighting and intellisense.\n\n## If you face problem when running, Please create the app using the following command\n\n```bash\nnpx degit github:actionanand/first-svelte#1-skeleton your-app-name\ncd your-app-name\n```\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\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## Using TypeScript\n\nThis template comes with a script to set up a TypeScript development environment, you can run it immediately after cloning the template with:\n\n```bash\nnode scripts/setupTypeScript.js\n```\n\nOr remove the script via:\n\n```bash\nrm scripts/setupTypeScript.js\n```\n\nIf you want to use `baseUrl` or `path` aliases within your `tsconfig`, you need to set up `@rollup/plugin-alias` to tell Rollup to resolve the aliases. For more info, see [this StackOverflow question](https://stackoverflow.com/questions/63427935/setup-tsconfig-path-in-svelte).\n\n## Deploying to the web\n\n### With [Vercel](https://vercel.com)\n\nInstall `vercel` if you haven't already:\n\n```bash\nnpm install -g vercel\n```\n\nThen, from within your project folder:\n\n```bash\ncd public\nvercel deploy --name my-project\n```\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\n### Other Resources\n\n- [Replacement for git clone - degit](https://dev.to/vuelancer/replacement-for-git-clone-degit-3lf1)\n- [npm-run-all NPM Package](https://www.npmjs.com/package/npm-run-all)\n\n### Store additional info\n\n1. [Derived Stores](https://svelte.dev/tutorial/derived-stores)\n\nYou can have a store which produces values based on another store + some adjustment logic.\n\nExample:\n\n```js\nimport { readable, derived } from 'svelte/store';\n \nexport const time = readable(new Date(), function start(set) {\n    const interval = setInterval(() =\u003e {\n        set(new Date());\n    }, 1000);\n \n    return function stop() {\n        clearInterval(interval);\n    };\n});\n \nconst start = new Date();\n \nexport const elapsed = derived(\n    time,\n    $time =\u003e Math.round(($time - start) / 1000)\n);\n```\n\n2. [Store Bindings](https://svelte.dev/tutorial/store-bindings)\n\nAllows you to bind: to values stored in a store.\n\nExample:\n\n`store.js`\n\n```js\nimport { writable, derived } from 'svelte/store';\n \nexport const name = writable('world');\n \nexport const greeting = derived(\n    name,\n    $name =\u003e `Hello ${$name}!`\n);\n```\n\n`App.svelte`\n\n```svelte\n\u003cscript\u003e\n    import { name, greeting } from './stores.js';\n\u003c/script\u003e\n \n\u003ch1\u003e{$greeting}\u003c/h1\u003e\n\u003cinput bind:value={$name}\u003e\n \n\u003cbutton on:click=\"{() =\u003e $name += '!'}\"\u003e\n    Add exclamation mark!\n\u003c/button\u003e\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factionanand%2Fsvelte-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factionanand%2Fsvelte-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factionanand%2Fsvelte-store/lists"}