Skip to content

Conversation

@rob4226
Copy link
Contributor

@rob4226 rob4226 commented Aug 13, 2021

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
},

Still adds --force by default but adds a 'force' option that when
set to false, disables adding the --force flag.
@cla-bot
Copy link

cla-bot bot commented Aug 13, 2021

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
Copy link
Contributor Author

rob4226 commented Aug 13, 2021

@cla-bot check

@cla-bot cla-bot bot added the cla: yes label Aug 13, 2021
@cla-bot
Copy link

cla-bot bot commented Aug 13, 2021

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

@NathanWalker
Copy link
Contributor

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
Copy link
Contributor Author

rob4226 commented Aug 24, 2021

@NathanWalker Ok sounds good!

@NathanWalker NathanWalker merged commit 33a0e61 into NativeScript:main Aug 25, 2021
@NathanWalker
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants