{"id":13448675,"url":"https://github.com/nstudio/xplat","last_synced_at":"2025-05-14T18:02:32.356Z","repository":{"id":33296459,"uuid":"141856958","full_name":"nstudio/xplat","owner":"nstudio","description":"Cross-platform (xplat) tools for Nx workspaces.","archived":false,"fork":false,"pushed_at":"2025-02-02T18:33:43.000Z","size":8082,"stargazers_count":373,"open_issues_count":70,"forks_count":51,"subscribers_count":26,"default_branch":"main","last_synced_at":"2025-05-14T18:02:16.901Z","etag":null,"topics":["angular","cross-platform","electron","ionic","nativescript","nx","nx-workspaces","xplat"],"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/nstudio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2018-07-22T01:25:58.000Z","updated_at":"2025-05-06T14:26:57.000Z","dependencies_parsed_at":"2024-11-08T05:18:51.232Z","dependency_job_id":"31d11481-ddf5-4715-9c7f-ad79998fd64e","html_url":"https://github.com/nstudio/xplat","commit_stats":{"total_commits":342,"total_committers":17,"mean_commits":20.11764705882353,"dds":0.0935672514619883,"last_synced_commit":"082b07dbd4b3b961cb0b9b43f84fbcc851a893ab"},"previous_names":[],"tags_count":95,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nstudio%2Fxplat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nstudio%2Fxplat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nstudio%2Fxplat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nstudio%2Fxplat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nstudio","download_url":"https://codeload.github.com/nstudio/xplat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198452,"owners_count":22030964,"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","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":["angular","cross-platform","electron","ionic","nativescript","nx","nx-workspaces","xplat"],"created_at":"2024-07-31T05:01:52.372Z","updated_at":"2025-05-14T18:02:32.334Z","avatar_url":"https://github.com/nstudio.png","language":"TypeScript","readme":"\u003ch1 align=\"center\"\u003eCross-platform (xplat) tools for Nx workspaces\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/nstudio/xplat/master/xplat-logo.png\" align=\"center\" width=\"400\"\u003e\u003c/p\u003e\n\u003cdiv align=\"center\"\u003e\n\n[![License](https://img.shields.io/npm/l/@nstudio/schematics.svg?style=flat-square)]()\n[![NPM Version](https://badge.fury.io/js/%40nstudio%2Fschematics.svg)](https://www.npmjs.com/@nstudio/schematics)\n\n\u003c/div\u003e\n\u003chr\u003e\n\n**xplat** is an added value pack for [Nx](https://nrwl.io/nx) which provides additional app generators and optional supporting architecture for different platform/framework combinations.\n\n## Currently supported platforms\n\n- [Electron](https://electronjs.org/)\n  \u003e Build cross platform desktop apps with JavaScript, HTML, and CSS.\n- [Ionic](https://ionicframework.com/)\n  \u003e Build amazing apps in one codebase, for any platform, with the web.\n- [NativeScript](https://www.nativescript.org/)\n  \u003e Build rich iOS and Android apps with direct access to native api's from JavaScript directly.\n\n## Quickstart\n\nNote: Nx 19.x.x compatible.\n\n```sh\nnpx create-nx-workspace@19\n\n✔ Where would you like to create your workspace? · {your-workspace-name}\n\n# Choose \"None\"\n\n? Which stack do you want to use? … \nNone:          Configures a minimal structure without specific frameworks or technologies.\n\n# Choose \"Integrated\"\n\n? Package-based or integrated? … \nIntegrated:    Nx creates a workspace structure most suitable for building apps.\n```\n\n### Init workspace\n\nInstall the @nx/js plugin.\n\n```sh\nnpm install @nx/js -D\n```\n\nNow initialize -- This will ensure a `tsconfig.base.json` is created to begin building your workspace.\n\n```sh\nnpx nx g @nx/js:init\n```\n\n### Install the tools:\n\n```\nnpm install @nstudio/xplat -D\n```\n\nYou are now ready to create apps:\n\n```\nnpx nx g @nstudio/xplat:app\n```\n\n## App generation examples\n\nThe additional app generators can be used as follows:\n\n### Electron\n\nElectron app generator can use any web app in the workspace as it's target.\n\nIf you don't have a web app yet, create one first:\n\n```\nnpx nx g @nstudio/xplat:app sample\n```\n\n\u003e choose `web`\n\nYou can now use the web app as the Electron target:\n\n```\nnpx nx g @nstudio/xplat:app desktop --target=web-sample\n```\n\n\u003e choose `electron`\n\nDevelop with:\n\n```\nnpm run start.electron.desktop\n```\n\n### Ionic\n\n```\nnpx nx g @nstudio/xplat:app sample\n```\n\n\u003e choose `ionic`\n\nDevelop in browser with:\n\n```\nnpx nx serve ionic-sample\n```\n\nBuild Ionic app:\n\n```\nnpx nx build ionic-sample\n```\n\nA. **Capacitor iOS** - Prepare for development\n\n```\nnpm run prepare.ionic.sample.ios\n```\n\nYou can now open in Xcode for further development:\n\n```\nnpm run open.ionic.sample.ios\n```\n\nB. **Capacitor Android** - Prepare for development\n\n```\nnpm run prepare.ionic.sample.android\n```\n\nYou can now open in Android Studio for further development:\n\n```\nnpm run open.ionic.sample.android\n```\n\n### NativeScript\n\n```\nnx g @nstudio/xplat:app mobile\n```\n\n\u003e choose `nativescript`\n\nA. **iOS**\n\n```\nnpx nx run nativescript-mobile:ios\n```\n\nB. **Android**\n\n```\nnpx nx run nativescript-mobile:android\n```\n\n## Talks\n\n- [Super Powered, Server Rendered Progressive Native Apps](https://www.youtube.com/watch?v=EqqNexmu3Ug) by [Nathan Walker](http://github.com/NathanWalker) and [Jeff Whelpley](https://github.com/jeffwhelpley)\n- [ngAir 172 - xplat (cross-platform) tools for Nx workspaces with Nathan Walker](https://www.youtube.com/watch?v=0I8D25nab5c)\n\n## Recommended extra tooling\n\n- [VS Code](https://code.visualstudio.com/)\n- [Nx Console for VS Code](https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console)\n\n## Example repos for different scenarios\n\n- Ionic + Web: https://github.com/nstudio/xplat-sample-ionic-web\n- Electron + Web with routing: https://github.com/nstudio/xplat-sample-electron-routing\n\n## Context\n\n- [Why it's Hard to Decide on Technologies](https://medium.com/@adamklein_66511/why-its-hard-to-decide-on-technologies-9d67b6adf157) by [Adam Klein](https://github.com/adamkleingit)\n\n","funding_links":[],"categories":["TypeScript","Tools"],"sub_categories":["Platform-Specific"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnstudio%2Fxplat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnstudio%2Fxplat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnstudio%2Fxplat/lists"}