Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
X

xplat

> 前端框架
Open source

Cross-platform (xplat) tools for Nx workspaces.

374 stars0 likes0 views
WebsiteGitHub

About

Cross-platform (xplat) tools for Nx workspaces.

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

Note: Nx 19.x.x compatible.

bash
npx create-nx-workspace@19

✔ Where would you like to create your workspace? · {your-workspace-name}

# Choose "None"

? Which stack do you want to use? … 
None:          Configures a minimal structure without specific frameworks or technologies.

# Choose "Integrated"

? Package-based or integrated? … 
Integrated:    Nx creates a workspace structure most suitable for building apps.

Init workspace

Install the @nx/js plugin.

bash
npm install @nx/js -D

Now initialize -- This will ensure a tsconfig.base.json is created to begin building your workspace.

bash
npx nx g @nx/js:init

Install the tools:

bash
npm install @nstudio/xplat -D

You are now ready to create apps:

bash
npx nx g @nstudio/xplat:app

App 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:

bash
npx nx g @nstudio/xplat:app sample

choose web

You can now use the web app as the Electron target:

bash
npx nx g @nstudio/xplat:app desktop --target=web-sample

choose electron

Develop with:

bash
npm run start.electron.desktop

Ionic

bash
npx nx g @nstudio/xplat:app sample

choose ionic

Develop in browser with:

bash
npx nx serve ionic-sample

Build Ionic app:

bash
npx nx build ionic-sample

A. Capacitor iOS - Prepare for development

bash
npm run prepare.ionic.sample.ios

You can now open in Xcode for further development:

bash
npm run open.ionic.sample.ios

B. Capacitor Android - Prepare for development

bash
npm run prepare.ionic.sample.android

You can now open in Android Studio for further development:

bash
npm run open.ionic.sample.android

NativeScript

nx g @nstudio/xplat:app mobile

choose nativescript

A. iOS

bash
npx nx run nativescript-mobile:ios

B. Android

bash
npx nx run nativescript-mobile:android

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

  • VS Code
  • Nx Console for VS Code

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

Context

  • Why it's Hard to Decide on Technologies by Adam Klein

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptangularcross-platformelectronionic

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架