NativeScript / NativeScript/nx

How to make a shared Angular Web + NativeScript Angular Mobile app?

Open
#30 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
68
Forks
15
PR merge metrics
No merged PRs in 30d

Description

What is the proper procedure to start a new nx workspace for a shared NativeScript Angular Mobile App and Angular Web App?

Right now I have a NativeScript 7 / Angular 11 shared mobile/web app that uses the .tns.ts, .tns.html, .web.ts, etc... method of code splitting, but it seems the new NativeScript 8 and @nativescript/webpack do not support that anymore. This is a substantial project and I want to upgrade to NS8 /Angular 12 so I guess I need to convert the project to work in an nx workspace using the libs folder for the shared Angular modules. But I want to make sure I set up the nx workspace properly first before taking on this massive undertaking.

So basically, can someone please outline the proper commands to start a shared mobile/web NativeScript 8 / Angular 12 project in an nx workspace?

I tried staring an Angular nx workspace project then adding NativeScript but the nx commands to run the mobile project would not work, I kept getting Unable to install dependencies.. It made a minimal nested package.json in the mobile project with, @nativescript/core, @nativescript/android, and @nativescript/ios and the rest of the dependencies in the root package.json which seems right but idk. Any help would greatly be appreciated. Thank you!!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported Nx workspace setup and the “Unable to install dependencies” error using the NativeScript 8 and Angular 12 versions described. Document the commands and package layout needed for a shared mobile/web workspace, including the root and nested package.json files, and verify that the documented Nx commands run the mobile project.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
build-system, mobile, web-dev
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.