{"id":15688224,"url":"https://github.com/ph1p/create-svelte-app","last_synced_at":"2025-10-29T05:07:40.729Z","repository":{"id":41794373,"uuid":"185096565","full_name":"ph1p/create-svelte-app","owner":"ph1p","description":"A cli to build or serve svelte apps","archived":false,"fork":false,"pushed_at":"2023-03-04T03:41:39.000Z","size":1909,"stargazers_count":8,"open_issues_count":12,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T09:02:26.794Z","etag":null,"topics":["cli","svelte","sveltejs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ph1p.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-05-06T00:10:25.000Z","updated_at":"2021-08-03T21:57:40.000Z","dependencies_parsed_at":"2024-10-23T20:44:37.766Z","dependency_job_id":"af1bcb79-75a6-475c-93d0-40f2b37a8c55","html_url":"https://github.com/ph1p/create-svelte-app","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/ph1p/create-svelte-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ph1p%2Fcreate-svelte-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ph1p%2Fcreate-svelte-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ph1p%2Fcreate-svelte-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ph1p%2Fcreate-svelte-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ph1p","download_url":"https://codeload.github.com/ph1p/create-svelte-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ph1p%2Fcreate-svelte-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281563785,"owners_count":26522704,"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-10-29T02:00:06.901Z","response_time":59,"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":["cli","svelte","sveltejs"],"created_at":"2024-10-03T17:56:19.512Z","updated_at":"2025-10-29T05:07:40.682Z","avatar_url":"https://github.com/ph1p.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# create-svelte-app\n\nThis CLI provides you a way to create, build and serve your svelte app. Under the hood `webpack` is used for all operations.\n\n```bash\nnpm i create-svelte-app -g\n\n# yarn\nyarn add global create-svelte-app\n\n# or\nyarn create svelte-app\n```\n\n### How to use\n\nRun all commands inside a `svelte` project.\nYou don't need a bundler anymore, because as I said before, it already has a preconfigured webpack.\n\n**Example structure:**\n\n```\npackage.json\nsrc/\n  - App.svelte\n  main.js\n```\n\nIf you do not want this behavior, you can simple run `svelte create` and choose a template.\n\n### Single .svelte file\n\nYou can serve a `.svelte` file by running`svelte FILE_PATH.svelte` or `svelte serve FILE_PATH.svelte`. When you use this feature, a `main.js` is temporarily created by the CLI. If you want to pass `props` from this main file to your svelte file, you can set a JSON-String via the `--props` flag.\n\n```bash\n# or svelte serve ...\nsvelte ./test.svelte --props '{\"prop\":\"hi there!\"}'\n```\n\nAnd if you want to build a project with this `.svelte` file, run:\n\n```bash\nsvelte build ./build.svelte --props '{\"prop\":\"hi there!\"}'\n```\n\n### Custom Elements\n\nThis CLI makes it easy for you to create a custom element. Just run:\n\n```bash\nsvelte build FILE_PATH.svelte --custom-element # or short -ce\n```\n\nThe CLI creates the javascript file, and you can use your custom tag that you specified within your `\u003csvelte:options tag=\"your-custom-element\"/\u003e` tag.\n\n### `svelte --help`\n\n```bash\nOptions:\n  -V, --version            output the version number\n  -h, --help               output usage information\n\nCommands:\n  serve [options] [path]   Serve project/file\n  create [options] [path]  Create project\n  build [options] [path]   Build project (default entrypoint is ./src/main.js\n```\n\nYou can also run this command for each sub-command like this: `svelte create --help`.\n\n### `svelte serve` or just `svelte`\n\n```bash\nUsage: svelte serve [options] [path]\n\nServe a project or a single .svelte file (default entrypoint is ./src/main.js)\n\nOptions:\n  -m, --mode \u003ctype\u003e      Set mode (development|production) (default: \"development\")\n  --props \u003cstring\u003e       Set props JSON, if you serve a .svelte file (default: \"{}\")\n  -ce, --custom-element  Serve as custom element (default: false)\n  -t, --title \u003cstring\u003e   HTML-Page Title (default: \"Svelte-App\")\n  -p, --port \u003cnumber\u003e    Application port (default: 3000)\n  -h, --help             display help for command\n```\n\n### `svelte build`\n\n```bash\nUsage: svelte build [options] [path]\n\nBuild project (default entrypoint is ./src/main.js)\n\nOptions:\n  -m, --mode \u003ctype\u003e      Set mode (development|production) (default: \"production\")\n  --props \u003cstring\u003e       Set props JSON, if you serve a .svelte file (default: \"{}\")\n  -ce, --custom-element  Build as custom element (default: false)\n  -t, --title \u003cstring\u003e   HTML-Page Title (default: \"Svelte-App\")\n  -h, --help             display help for command\n```\n\n### `svelte create`\n\n```bash\nUsage: svelte create [options] [path]\n\nCreate project\n\nOptions:\n  -f, --force              Overwrite existing project (default: false)\n  -tpl, --template [name]  Set a template (default: \"\")\n  -h, --help               display help for command\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fph1p%2Fcreate-svelte-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fph1p%2Fcreate-svelte-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fph1p%2Fcreate-svelte-app/lists"}