17.0.1 • Published 6 months ago

@nstudio/xplat-utils v17.0.1

Weekly downloads
2,179
License
MIT
Repository
github
Last release
6 months ago

Build Status License NPM Version

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@latest

✔ 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.

npm install @nx/js -D

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

npx nx g @nx/js:init

Install the tools:

npm install @nstudio/xplat -D

You are now ready to create apps:

npx nx g @nstudio/xplat:app

Potential schematics error: If you encounter a SchematicNameCollisionException issue, you can see this gist to apply a patch: https://gist.github.com/NathanWalker/a8554c1e0bba700affeb0c4672d26b0e

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:

npx nx g @nstudio/xplat:app sample

choose web

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

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

choose electron

Develop with:

npm run start.electron.desktop

Ionic

npx nx g @nstudio/xplat:app sample

choose ionic

Develop in browser with:

npx nx serve ionic-sample

Build Ionic app:

npx nx build ionic-sample

A. Capacitor iOS - Prepare for development

npm run prepare.ionic.sample.ios

You can now open in Xcode for further development:

npm run open.ionic.sample.ios

B. Capacitor Android - Prepare for development

npm run prepare.ionic.sample.android

You can now open in Android Studio for further development:

npm run open.ionic.sample.android

NativeScript

nx g @nstudio/xplat:app mobile

choose nativescript

A. iOS

npx nx run nativescript-mobile:ios

B. Android

npx nx run nativescript-mobile:android

Documentation

Talks

Recommended extra tooling

Example repos for different scenarios

Context

16.5.5

10 months ago

16.5.4

10 months ago

16.5.3

10 months ago

16.5.2

10 months ago

16.5.9

9 months ago

16.5.8

10 months ago

16.5.7

10 months ago

16.5.6

10 months ago

16.5.1

10 months ago

16.5.0

10 months ago

17.0.1

6 months ago

17.0.0

6 months ago

16.7.0-alpha.0

8 months ago

16.7.3

7 months ago

16.7.2

7 months ago

16.7.1

7 months ago

16.7.0

8 months ago

16.7.6

7 months ago

16.7.5

7 months ago

16.7.4

7 months ago

16.8.0

7 months ago

17.0.0-alpha.0

6 months ago

17.0.0-alpha.1

6 months ago

15.0.4-rc.1

1 year ago

16.2.0-beta.0

11 months ago

15.0.4-rc.0

1 year ago

15.0.3

1 year ago

15.0.2

2 years ago

15.0.0

2 years ago

15.0.1

2 years ago

14.3.0

2 years ago

14.0.0

2 years ago

14.0.1

2 years ago

13.4.2-rc.2

2 years ago

13.4.2-rc.0

2 years ago

13.4.2-rc.1

2 years ago

13.4.2

2 years ago

13.4.3

2 years ago

13.4.0

2 years ago

13.4.1

2 years ago

13.0.0

3 years ago

13.0.1

3 years ago

12.7.0

3 years ago

12.6.0-rc.0

3 years ago

12.5.1

3 years ago

12.5.0

3 years ago

12.4.3

3 years ago

12.4.2

3 years ago

12.4.0

3 years ago

12.4.1

3 years ago

12.0.2

3 years ago

12.0.1

3 years ago

12.0.0

3 years ago

12.0.0-rc.0

3 years ago

11.1.1

3 years ago

11.1.0

3 years ago

11.0.22

3 years ago

11.0.19

3 years ago

11.0.20

3 years ago

11.0.21

3 years ago

11.0.17

3 years ago

11.0.18

3 years ago

11.0.15

3 years ago

11.0.16

3 years ago

11.0.14

3 years ago

11.0.13

3 years ago

11.0.11

3 years ago

11.0.12

3 years ago

11.0.8

3 years ago

11.0.9

3 years ago

11.0.7

3 years ago

11.0.6

3 years ago

11.0.5

3 years ago

11.0.4

3 years ago

11.0.3

3 years ago

11.0.3-rc.7

3 years ago

11.0.3-rc.6

3 years ago

11.0.3-rc.5

3 years ago

11.0.3-rc.4

3 years ago

11.0.3-rc.3

3 years ago

11.0.3-rc.2

3 years ago

11.0.3-rc.1

3 years ago

11.0.3-rc.0

3 years ago

11.0.2

3 years ago

11.0.0

3 years ago

11.0.1

3 years ago

11.0.0-rc.1

3 years ago

11.0.0-rc.0

3 years ago

10.3.9

3 years ago

10.3.8

4 years ago

10.3.7

4 years ago

10.3.6

4 years ago

10.3.5

4 years ago

10.3.4

4 years ago

10.3.3

4 years ago

10.3.2

4 years ago

10.3.1

4 years ago

10.3.0

4 years ago

10.2.0

4 years ago

10.1.0

4 years ago

10.1.1

4 years ago

10.0.6

4 years ago

10.0.5

4 years ago

10.0.4

4 years ago

10.0.1

4 years ago

10.0.2

4 years ago

10.0.3

4 years ago

10.0.0

4 years ago