{"id":16969612,"url":"https://github.com/webmasterdevlin/nativescript-svelte","last_synced_at":"2025-09-05T16:11:36.233Z","repository":{"id":50050277,"uuid":"214293399","full_name":"webmasterdevlin/nativescript-svelte","owner":"webmasterdevlin","description":"Svelte's cross-platform mobile development platform","archived":false,"fork":false,"pushed_at":"2023-01-07T10:34:55.000Z","size":3115,"stargazers_count":3,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-29T23:59:59.734Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webmasterdevlin.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}},"created_at":"2019-10-10T22:01:22.000Z","updated_at":"2023-08-10T16:23:03.000Z","dependencies_parsed_at":"2023-02-06T22:30:25.661Z","dependency_job_id":null,"html_url":"https://github.com/webmasterdevlin/nativescript-svelte","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/webmasterdevlin/nativescript-svelte","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmasterdevlin%2Fnativescript-svelte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmasterdevlin%2Fnativescript-svelte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmasterdevlin%2Fnativescript-svelte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmasterdevlin%2Fnativescript-svelte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webmasterdevlin","download_url":"https://codeload.github.com/webmasterdevlin/nativescript-svelte/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmasterdevlin%2Fnativescript-svelte/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273782460,"owners_count":25167130,"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-09-05T02:00:09.113Z","response_time":402,"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":[],"created_at":"2024-10-14T00:25:53.560Z","updated_at":"2025-09-05T16:11:36.204Z","avatar_url":"https://github.com/webmasterdevlin.png","language":"JavaScript","readme":"This is a barebones svelte-native project template. It was created directly from a nativescript core project template. It provides an easy way to get started with a svelte native project.\n\n# Usage\n\nYou can get started with this using `degit`\n\n```bash\n$ degit halfnelson/svelte-native-template myapp\n```\n\nyour svelte-native app will be found in the `myapp` folder\n\n# Recreating From Scratch\n\nThis was created using:\n\nCreate ns core app\n\n```bash\n    tns create svelte-ns-testapp --appid sntest.halfnelson.github.io --ts\n```\n\nInstall svelte, svelte-native, svelte-loader\n\n```bash\n    $ npm install --save-dev svelte\n    $ npm install svelte-native\n    $ npm install --save-dev \"halfnelson/svelte-loader#fix-virtual-purge\"\n    $ npm install --save-dev svelte-native-preprocessor\n```\nimport SvelteNativePreprocessor in webpack.config.js\n\n```js\nconst svelteNativePreprocessor = require(\"svelte-native-preprocessor\");\n```\n\nAppend svelte-loader to end module rules after ts\n\n```js\n  {\n        test: /\\.svelte$/,\n        exclude: /node_modules/,\n        use: [\n            { \n                loader: 'svelte-loader',\n                options: {\n                    preprocess: svelteNativePreprocessor()\n                }\n            }\n        ]\n    }\n```   \n\nRemove nativescript files from `app` except for  `package.json` and `app.ts` and `app.css`\n\nmake the following changes to the app folder:\n\nadd `svelte-components.d.ts`:\n\n```js\ndeclare module \"*.svelte\" {\n    export default SvelteComponent;\n}\n```\n\nchange `app.ts` to:\n\n```js\nimport { svelteNative } from \"svelte-native\";\nimport App from  \"./App.svelte\";\nsvelteNative(App, {});\n```\n\nadd `App.svelte`:\n\n```html\n\u003cpage xmlns=\"tns\" class=\"page\"\u003e\n    \u003cactionBar title=\"My App\" icon=\"\" class=\"action-bar\"\u003e\n    \u003c/actionBar\u003e\n    \u003cstackLayout class=\"p-20\"\u003e\n        \u003clabel text=\"Tap the button\" class=\"h1 text-center\"/\u003e\n        \u003cbutton text=\"TAP\" on:tap=\"{ onTap }\" class=\"btn btn-primary btn-active\"/\u003e\n        \u003clabel text=\"{ message }\" class=\"h2 text-center\" textWrap=\"true\"/\u003e\n    \u003c/stackLayout\u003e\n\u003c/page\u003e\n\n\u003cscript\u003e\n    let counter = 42;\n    let message;\n    $: message = (counter \u003c= 0) \n                    ? \"Hoorraaay! You unlocked the Svelte-Native clicker achievement!\"\n                    : `${counter} taps left`\n    \n    const onTap = () =\u003e counter--;\n\u003c/script\u003e\n```\n\nRun the app with an ensure it worked\n\n```bash\ntns run android\n```\n\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebmasterdevlin%2Fnativescript-svelte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebmasterdevlin%2Fnativescript-svelte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebmasterdevlin%2Fnativescript-svelte/lists"}