Package Exports
- @nstudio/xplat
- @nstudio/xplat/testing
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nstudio/xplat) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Cross-platform (xplat) tools for Nx workspaces

xplat is an added value pack for Nx which provides additional app generators and optional supporting architecture for different platform/framework combinations.
Currently supported platforms
- Electron
Build cross platform desktop apps with JavaScript, HTML, and CSS.
- Ionic
Build amazing apps in one codebase, for any platform, with the web.
- NativeScript
Build rich iOS and Android apps with direct access to native api's from JavaScript directly.
Quickstart
npx create-nx-workspace@latestAt the prompts:
provide a name
choose
empty
npm i @nstudio/xplat -DYou are now ready to create apps:
nx g appApp generation examples
The additional app generators can be used as follows:
Electron
Electron app generator can use any web app in the workspace as it's target.
If you don't have a web app yet, create one first:
nx g app samplechoose
web
You can now use the web app as the Electron target:
nx g app desktop --target=web-samplechoose
electron
Develop with:
npm run start.electron.desktopIonic
nx g app samplechoose
ionic
Develop in browser with:
nx run ionic-sample:serveA. Capacitor iOS - Prepare for development
npm run prepare.ionic.sample.iosYou can now open in Xcode for further development:
npm run open.ionic.sample.iosB. Capacitor Android - Prepare for development
npm run prepare.ionic.sample.androidYou can now open in Android Studio for further development:
npm run open.ionic.sample.androidNativeScript
nx g app mobilechoose
nativescript
A. iOS
nx run nativescript-mobile:iosB. Android
nx run nativescript-mobile:androidDocumentation
Talks
- Super Powered, Server Rendered Progressive Native Apps by Nathan Walker and Jeff Whelpley
- ngAir 172 - xplat (cross-platform) tools for Nx workspaces with Nathan Walker
Recommended extra tooling
Example repos for different scenarios
- Ionic + Web: https://github.com/nstudio/xplat-sample-ionic-web
- Electron + Web with routing: https://github.com/nstudio/xplat-sample-electron-routing
Real world apps built with xplat
Portable North Pole
- Web: https://www.portablenorthpole.com/en/home
- iOS: https://itunes.apple.com/us/app/id902026228?mt=8
- Android: https://play.google.com/store/apps/details?id=com.ugroupmedia.pnp14&hl=en
My PreSonus
- Web: http://my.presonus.com/
- iOS: https://apps.apple.com/us/app/mypresonus/id1282534772
- Android: https://play.google.com/store/apps/details?id=com.presonus.mypresonus&hl=en_US
Sweet
- Web: https://sweet.io/
- iOS: https://apps.apple.com/us/app/sweet/id1452120535
- Android: https://play.google.com/store/apps/details?id=io.sweet.app&hl=en_US
Context
Contributing
Please see our guidelines for contributing.
| NathanWalker | dungahk | pegaltier | m-abs | sr3dna | mbaljeetsingh |
| dopsonbr | AgentEnder | davecoffin | dmitryr117 | kamilmysliwiec | madmath03 |
| miguelramos | n0mer |