{"id":23093071,"url":"https://github.com/crispengari/svelte-startup","last_synced_at":"2026-04-10T02:57:44.705Z","repository":{"id":141095070,"uuid":"513153917","full_name":"CrispenGari/svelte-startup","owner":"CrispenGari","description":"📁 This repository is a svelte startup for cybernatically enhanced web apps.","archived":false,"fork":false,"pushed_at":"2022-07-23T08:43:40.000Z","size":168,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T18:52:02.992Z","etag":null,"topics":["css","html","javascript","nodejs","scss","ssr","sveltejs","typescript","webapplications"],"latest_commit_sha":null,"homepage":"","language":"Svelte","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/CrispenGari.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":"2022-07-12T13:29:41.000Z","updated_at":"2022-07-12T18:56:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f7b3b49-f69c-43cd-8a2f-56f0da328f30","html_url":"https://github.com/CrispenGari/svelte-startup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CrispenGari/svelte-startup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrispenGari%2Fsvelte-startup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrispenGari%2Fsvelte-startup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrispenGari%2Fsvelte-startup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrispenGari%2Fsvelte-startup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CrispenGari","download_url":"https://codeload.github.com/CrispenGari/svelte-startup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrispenGari%2Fsvelte-startup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272186692,"owners_count":24888429,"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","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["css","html","javascript","nodejs","scss","ssr","sveltejs","typescript","webapplications"],"created_at":"2024-12-16T21:46:24.757Z","updated_at":"2026-04-10T02:57:39.682Z","avatar_url":"https://github.com/CrispenGari.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Svelte Startup\n\nThis repository contains some Svelte applications for cybernatically enhanced web applications.\n\n\u003cimg src=\"/cover.png\" width=\"100%\" alt=\"cover\"/\u003e\n\n### Getting Started\n\nFirst you have to make sure that you have node.js installed on your computer together with the package manager. In my case i will use `yarn` but feel free to use the package manager that you want like `npm`. For the code editor i will be using VSCode so first thing that i will do is to download the `Svelte` extenstion for VSCode and install i. I will download an extenstion called `\"Svelte for VS Code\"` After installing it go to the settings and edit the `settings.json` and add the following to the `.json` file:\n\n```json\n \"[svelte]\": {\n    \"editor.defaultFormatter\": \"svelte.svelte-vscode\"\n  }\n```\n\n\u003e After you have done that you need to reload the window.\n\nTo create a new svelte application you wll run the following command:\n\n```shell\nyarn create svelte 01_GETTING_STARTED\n# npm\nnpm create svelte 01_GETTING_STARTED\n```\n\nThen you need to answer some couple of questions then next you need to run the following commands:\n\n```shell\ncd 01_GETTING_STARTED\n# yarn\nyarn\nyarn run dev\n\n# npm\nnpm install\nnpm run dev\n\n```\n\nThen a svelte application will be running on port `3000` and can be accessed at http://localhost:3000/.\n\nWe will be working mostly in the `src` folder where there's a `routes` folder by default. Like in next.js a file name is a page router in this folder. So for a home page `/` a file name is `index.svelte`\n\nIn a `svelte` file we will have the following structure\n\n```svelte\n\u003cscript lang=\"ts\"\u003e\nconsole.log(\"Hello world\")\n\u003c/script\u003e\n\n\u003c!-- html content goes here --\u003e\n\u003ch1\u003eHello world\u003c/h1\u003e\n\n\u003cstyle\u003e\n\n\u003c/style\u003e\n\n```\n\n### Layout\n\nIn svelte we can create a file called `__layout.svelte` in the routes folder. This is where our common layout components will stay. This is also a good place to import our `global.css` file. The `__layout.svelte` file may look as follows in svelte.\n\n```svelte\n\u003cscript\u003e\n  import \"../styles/global.css\";\n  import Footer from \"../components/Footer.svelte\";\n  import Nav from \"../components/Nav.svelte\";\n\u003c/script\u003e\n\n\u003csvelte:head\u003e\n  \u003ctitle\u003eMy app\u003c/title\u003e\n  \u003clink rel=\"shortcut icon\" href=\"favicon.ico\" type=\"image/x-icon\" /\u003e\n\u003c/svelte:head\u003e\n\u003cNav /\u003e\n\u003cslot /\u003e\n\u003cFooter /\u003e\n```\n\nSo the rest of the code from the pages will leave in the `\u003cslot/\u003e`.\n\n### Refs\n\n1. [svelte.dev](https://svelte.dev/)\n2. [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Svelte_getting_started)\n3. [kit.svelte.dev](https://kit.svelte.dev/docs/introduction)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrispengari%2Fsvelte-startup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrispengari%2Fsvelte-startup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrispengari%2Fsvelte-startup/lists"}