Skip to content

Commit 0f4e76b

Browse files
committed
chore: update cli to bash for syntax highlighting
1 parent ca69255 commit 0f4e76b

File tree

85 files changed

+207
-207
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+207
-207
lines changed

content/configuration/webpack.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Add file replacement rules. For source files (`.js` and `.ts`) this will add a n
4949

5050
Example:
5151

52-
```cli
52+
```bash
5353
--env.replace=./src/environments/environment.ts:./src/environments/environment.prod.ts
5454
```
5555

@@ -380,7 +380,7 @@ module.exports = (env) => {
380380

381381
To change an existing rule, it's useful to know how it has been set up first:
382382

383-
```cli
383+
```bash
384384
ns prepare android|ios --env.verbose
385385
# Note: we plan to add a separate command to just print the internal config
386386
```

content/guide/choosing-an-editor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The `code` command runs in your command-line or terminal, and it works just like
2020

2121
Once set up, you can type `code .` in your terminal to open the files in your current folder for editing. For example, you could use the following sequence of command to create a new NativeScript app and open it for editing.
2222

23-
```cli
23+
```bash
2424
ns create MyNewApp
2525
cd MyNewApp
2626
code .

content/guide/cli-basics.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This helps ensure everything fits together correctly. If you're dealing with mys
2525

2626
To clean, run this command from your project's root directory:
2727

28-
```cli
28+
```bash
2929
ns clean
3030
```
3131

@@ -43,7 +43,7 @@ If you have multiple projects in a directory, you can run `ns clean` in it, and
4343

4444
To list all connected devices (both physical and virtual), run:
4545

46-
```cli
46+
```bash
4747
ns devices
4848
```
4949

@@ -61,7 +61,7 @@ Example output:
6161

6262
To set the default package manager that the CLI uses (unless overridden in [nativescript.config.ts](/project-structure/nativescript-config#cli-packagemanager)):
6363

64-
```cli
64+
```bash
6565
ns package-manager set npm
6666
ns package-manager set yarn
6767
ns package-manager set yarn2 # experimental

content/guide/creating-a-project.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ Official templates can be found in the [Templates GitHub repository](https://git
1616

1717
Some of the templates are listed in the NativeScript CLI when creating a new project with `ns create`, others may be used by passing the `--template` flag with the template name (NPM package name).
1818

19-
```cli
19+
```bash
2020
ns create myCoolApp
2121
```
2222

2323
If you would like to try one of the other templates not listed by `ns create` run:
2424

25-
```cli
25+
```bash
2626
ns create myCoolApp --template <template-package-name or path-to-template>
2727
```
2828

2929
:::tip
3030

3131
If you want to skip the interactive prompts, you can pass the following flags:
3232

33-
```cli
33+
```bash
3434
ns create myCoolApp --angular // or --ng for short
3535
ns create myCoolApp --vue
3636
ns create myCoolApp --vue --ts // for vue with typescript
@@ -56,7 +56,7 @@ A basic template with a single page and no custom styles.
5656

5757
To use, run:
5858

59-
```cli
59+
```bash
6060
ns create myCoolApp --template @nativescript/template-blank
6161
```
6262

@@ -75,7 +75,7 @@ A template with a side drawer.
7575

7676
To use, run:
7777

78-
```cli
78+
```bash
7979
ns create myCoolApp --template @nativescript/template-drawer-navigation
8080
```
8181

@@ -94,7 +94,7 @@ A template with multiple tabs.
9494

9595
To use, run:
9696

97-
```cli
97+
```bash
9898
ns create myCoolApp --template @nativescript/template-tab-navigation
9999
```
100100

@@ -111,7 +111,7 @@ A template with a ListView and a details screen.
111111

112112
To use, run:
113113

114-
```cli
114+
```bash
115115
ns create myCoolApp --template @nativescript/template-master-detail
116116
```
117117

content/guide/debugging.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ console.timeEnd('myLabel')
4040

4141
To start a Chrome debugging session, run your app in debug mode:
4242

43-
```cli
43+
```bash
4444
ns debug android|ios
4545
```
4646

4747
The `ns debug` command builds and deploys the app on a connected device or emulator, in case you have multiple devices available you will need to pick one from a list, or pass in the `--device <id>` from `ns devices`.
4848

4949
Once the app starts, a URL is printed to the console
5050

51-
```cli{5-6}
51+
```bash{5-6}
5252
Setting up debugger proxy...
5353
Press Ctrl + C to terminate, or disconnect.
5454
@@ -99,15 +99,15 @@ If you need to debug parts of the native stack instead of the JavaScript part of
9999

100100
To start, prepare the iOS app:
101101

102-
```cli
102+
```bash
103103
ns prepare ios
104104
```
105105

106106
This compiles your app source, creates the `platforms/ios` folder (if it doesn't exist yet). You can pass any of the flags you would normally pass to `ns run`.
107107

108108
Next, open the `platforms/ios/<project-name>.xcworkspace` in XCode, either through the XCode browse menu, or from the command line:
109109

110-
```cli
110+
```bash
111111
open platforms/ios/<project-name>.xcworkspace
112112
```
113113

@@ -134,7 +134,7 @@ If you need to debug parts of the native stack instead of the JavaScript part of
134134

135135
To start, prepare the Android app:
136136

137-
```cli
137+
```bash
138138
ns prepare android
139139
```
140140

@@ -145,7 +145,7 @@ Next, open the `platforms/android` folder in Android Studio, through the Android
145145
:::tip Tip
146146
If you [set up the `studio` command line launcher](https://stackoverflow.com/a/48266060/2270725), you can quickly open the NativeScript project from the command line with
147147

148-
```cli
148+
```bash
149149
studio platforms/android
150150
```
151151

content/guide/development-workflow/using-packages.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ You can also explore [@nativescript/core](/core/#nativescript-core), which is in
2121

2222
Once the needed plugin is found, it can be installed in a NativeScript app using the `ns plugin add` command which behaves just like `npm install` while also modifying any existing platform projects (linking, etc.).
2323

24-
```cli
24+
```bash
2525
ns plugin add <plugin-name>
2626
```
2727

2828
For example, the following command installs the [NativeScript camera plugin](https://v8.docs.nativescript.org/plugins/camera.html).
2929

30-
```cli
30+
```bash
3131
ns plugin add @nativescript/camera
3232
```
3333

3434
Instead of using plugin add, package managers like npm, yarn, or pnpm can also be used:
3535

36-
```cli
36+
```bash
3737
npm install --save @nativescript/camera
3838
```
3939

@@ -43,7 +43,7 @@ The installation of a NativeScript plugin is similar to installing a npm package
4343

4444
As demonstrated above, the command `ns plugin add @nativescript/camera` is equivalent to `npm i @nativescript/camera --save` internally. However, when installing a developer dependency, such as @nativescript/types or @nativescript/webpack, you need to explicitly save it as a devDependency. To do so, use the npm install command with the --save-dev flag. For instance:
4545

46-
```cli
46+
```bash
4747
npm i @nativescript/types --save-dev
4848
```
4949

@@ -69,13 +69,13 @@ requestPermissions()
6969

7070
To remove a NativeScript plugin, you can use the following command.
7171

72-
```cli
72+
```bash
7373
ns plugin remove <plugin-name>
7474
```
7575

7676
For example, the following command removes the NativeScript camera plugin.
7777

78-
```cli
78+
```bash
7979
ns plugin remove @nativescript/camera
8080
```
8181

@@ -99,6 +99,6 @@ NativeScript CLI supports three package managers:
9999

100100
In case you want to check what is the currently used package manager, you can use:
101101

102-
```cli
102+
```bash
103103
ns package-manager get
104104
```

content/guide/native-code/generate-typings.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ contributors:
88

99
## Generate types for iOS
1010

11-
```cli
11+
```bash
1212
ns typings ios
1313
```
1414

@@ -18,21 +18,21 @@ This will generate the following folder structure `typings/ios/arm64`
1818

1919
For Android run:
2020

21-
```cli
21+
```bash
2222
ns typings android --jar <path to a jar>
2323
# or
2424
ns typings android --aar <path to an aar>
2525
```
2626

2727
You can also generate typings for an Android package (Maven):
2828

29-
```cli
29+
```bash
3030
ns typings android <package-name>
3131
```
3232

3333
For instance:
3434

35-
```cli
35+
```bash
3636
ns typings android "com.google.android.gms:play-services-tasks"
3737
```
3838

content/guide/publishing/android-google-play.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The following commands will build your app in release mode, and copy the result
3333

3434
<!-- tab: .aab -->
3535

36-
```cli
36+
```bash
3737
ns build android --release \
3838
--key-store-path <path-to-your-keystore> \
3939
--key-store-password <your-key-store-password> \
@@ -45,7 +45,7 @@ ns build android --release \
4545

4646
<!-- tab: .apk -->
4747

48-
```cli
48+
```bash
4949
ns build android --release \
5050
--key-store-path <path-to-your-keystore> \
5151
--key-store-password <your-key-store-password> \
@@ -58,7 +58,7 @@ ns build android --release \
5858

5959
<!-- tab: Example Windows -->
6060

61-
```cli
61+
```bash
6262
ns build android --release \
6363
--key-store-path C:\projects\app\upload.keystore \
6464
--key-store-password example_password \
@@ -70,7 +70,7 @@ ns build android --release \
7070

7171
<!-- tab: Example macOS/Linux -->
7272

73-
```cli
73+
```bash
7474
ns build android --release \
7575
--key-store-path ~/projects/app/upload.keystore \
7676
--key-store-password example_password \

content/guide/running.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ To run a NativeScript app, you need a device &mdash; either a physical or virtu
1111

1212
To run a project, use the `ns run` command. There's also a `ns debug` command covered in the [debugging documentation](/guide/debugging#debugging-with-chrome-devtools).
1313

14-
```cli
14+
```bash
1515
ns run android
1616
ns run ios
1717
```
@@ -52,13 +52,13 @@ Next, go to `Settings › System › Developer options` and enable `USB debuggin
5252

5353
Plug in your device via USB and check that it is correctly being detected by <abbr title="Android Debug Bridge">ADB</abbr>:
5454

55-
```cli
55+
```bash
5656
adb devices
5757
```
5858

5959
To verify NativeScript can also detect the device, run:
6060

61-
```cli
61+
```bash
6262
ns devices android
6363
```
6464

@@ -99,7 +99,7 @@ If there's no `.xcworkspace` file, you can open the `.xcodeproj` file instead.
9999

100100
Once the app successfully runs from Xcode, you can close it and continue using the NativeScript cli:
101101

102-
```cli
102+
```bash
103103
ns run ios
104104
```
105105

@@ -111,7 +111,7 @@ Once the device has been [prepared for development](#preparing-an-ios-device-for
111111

112112
After disconnecting the cable, the device should remain visible in `ns devices` and running the app should work as normal:
113113

114-
```cli
114+
```bash
115115
ns run ios
116116
```
117117

0 commit comments

Comments
 (0)