Skip to content

Commit 25b54c6

Browse files
authored
chore: readme note about invoking builds
1 parent d20c168 commit 25b54c6

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

packages/nx/README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ Here's an example app config:
217217
```json
218218
"nativescript-mobile": {
219219
"projectType": "application",
220-
"root": "apps/nativescript-mobile/",
221220
"sourceRoot": "apps/nativescript-mobile/src",
222221
"prefix": "",
223222
"targets": {
@@ -354,42 +353,40 @@ You can also set this option in the config, for example:
354353

355354
Instead of running the app on a simulator or device you can create a build for the purposes of distribution/release. Various release settings will be needed for iOS and Android which can be passed as additional command line arguments. [See more in the NativeScript docs here](https://docs.nativescript.org/releasing.html#overview). Any additional cli flags as stated in the docs can be passed on the end of the `nx build` command that follows.
356355

357-
The key difference is usage of `nx build` instead of `nx run`.
358-
359356
Build with an environment configuration enabled (for example, with `prod`):
360357

361358
**Android:**
362359

363360
```sh
364-
npx nx build <app-name>:android:prod
361+
npx nx run <app-name>:build:prod --platform=android
365362
```
366363

367364
You can pass additional NativeScript CLI options as flags on the end of you build command.
368365

369366
* example of building AAB bundle for upload to Google Play:
370367

371368
```
372-
npx nx build <app-name>:android:prod \
369+
npx nx run <app-name>:build:prod --platform=android \
373370
--aab \
374-
--key-store-path <path-to-your-keystore> \
375-
--key-store-password <your-key-store-password> \
376-
--key-store-alias <your-alias-name> \
377-
--key-store-alias-password <your-alias-password> \
378-
--copy-to ./dist/build.aab
371+
--key-store-path=<path-to-your-keystore> \
372+
--key-store-password=<your-key-store-password> \
373+
--key-store-alias=<your-alias-name> \
374+
--key-store-alias-password=<your-alias-password> \
375+
--copyTo=./dist/build.aab
379376
```
380377

381378
**iOS:** (Mac only)
382379

383380
```sh
384-
npx nx build <app-name>:ios:prod
381+
npx nx run <app-name>:build:prod --platform=ios
385382
```
386383

387384
As mentioned, you can pass any additional NativeScript CLI options as flags on the end of your nx build command:
388385

389386
* example of building IPA for upload to iOS TestFlight:
390387

391388
```
392-
npx nx build <app-name>:ios:prod \
389+
npx nx run <app-name>:build:prod --platform=ios \
393390
--provision <provisioning-profile-name> \
394391
--copy-to ./dist/build.ipa
395392
```
@@ -443,7 +440,7 @@ If the plugin is needed by one app only, and not others, you can install it for
443440

444441
```sh
445442
cd apps/<app-name>
446-
ns plugin add <plugin-name>
443+
npm install <plugin-name>
447444
```
448445

449446
### Installing NativeScript plugins at workspace-level

0 commit comments

Comments
 (0)