Neverending Programming Mistakes
    Wondering what’s next for npm?Check out our public roadmap! »

    @nstudio/electron
    TypeScript icon, indicating that this package has built-in type declarations

    11.1.1 • Public • Published

    Cross-platform (xplat) tools for Nx workspaces

    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
    

    At the prompts:

    provide a name

    choose empty

    npm i @nstudio/xplat -D
    

    You are now ready to create apps:

    nx g 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:

    nx g app sample
    

    choose web

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

    nx g app desktop --target=web-sample
    

    choose electron

    Develop with:

    npm run start.electron.desktop
    

    Ionic

    nx g app sample
    

    choose ionic

    Develop in browser with:

    nx run ionic-sample:serve
    

    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 app mobile
    

    choose nativescript

    A. iOS

    nx run nativescript-mobile:ios
    

    B. Android

    nx run nativescript-mobile:android
    

    Documentation

    Talks

    Recommended extra tooling

    Example repos for different scenarios

    Real world apps built with xplat

    Portable North Pole

    My PreSonus

    Sweet

    Context

    Contributing

    Please see our guidelines for contributing.

    NathanWalker dungahk pegaltier m-abs sr3dna mbaljeetsingh
    NathanWalker dungahk pegaltier m-abs sr3dna mbaljeetsingh
    dopsonbr AgentEnder davecoffin dmitryr117 kamilmysliwiec madmath03
    dopsonbr AgentEnder davecoffin dmitryr117 kamilmysliwiec madmath03
    miguelramos n0mer
    miguelramos n0mer

    Install

    npm i @nstudio/electron

    DownloadsWeekly Downloads

    213

    Version

    11.1.1

    License

    MIT

    Unpacked Size

    453 kB

    Total Files

    33

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar