NativeScript / nx

NativeScript for Nx.
Other
61 stars 15 forks source link

fix: allow --force to be optional #33

Closed rob4226 closed 3 years ago

rob4226 commented 3 years ago

This PR adds the force option that allows disabling the default behavior of always adding the --force flag to every NativeScript build/run command. I saw the below note, but there are some edge cases where running npm i is not desirable or problematic.

always add --force for now since within Nx we use @nativescript/webpack at root only and the {N} cli shows a blocking error if not within the app

This commit still leaves the current behavior of adding --force by default but allows disabling the --force flag by explictly setting the new force option to false.

Example

"options": {
    "platform": "android",
    "noHmr": true,
    "force": false
},
cla-bot[bot] commented 3 years ago

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign the CLA at https://www.nativescript.org/cla. CLA has not been signed by users: @Rob4226. After signing the CLA, you can ask me to recheck this PR by posting @cla-bot check as a comment to the PR.

rob4226 commented 3 years ago

@cla-bot check

cla-bot[bot] commented 3 years ago

The cla-bot has been summoned, and re-checked this pull request!

NathanWalker commented 3 years ago

Thank you for this @Rob4226 ! I’ve been hesitating with the 8.1 cli release around the corner as it improves a number of things around workspace handling which includes ability to mix in yarn workspaces with Nx and also no longer require force with some conditions. Will merge this and out in a release after 8.1.

rob4226 commented 3 years ago

@NathanWalker Ok sounds good!

NathanWalker commented 2 years ago

https://github.com/NativeScript/nx/releases/tag/2.0.5