forked from phonegap/phonegap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathguide_command-line_index.md.html
605 lines (472 loc) · 23.9 KB
/
guide_command-line_index.md.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
<meta name="generator" content="joDoc">
<title>PhoneGap API Documentation</title>
<link rel="stylesheet" type="text/css" href="index.css">
<link rel="stylesheet" type="text/css" href="mobile.css" media="only screen and (max-device-width: 1024px)">
<link rel="stylesheet" type="text/css" href="prettify/prettify.css">
</head>
<body>
<div id="header">
<h1><a href="index.html">PhoneGap Documentation</a></h1>
<small>
<select><optgroup label="English" value="en">
<option value="edge">edge</option>
<option value="2.9.0rc1">2.9.0rc1</option>
<option selected value="2.9.0">2.9.0</option>
<option value="2.8.0">2.8.0</option>
<option value="2.7.0rc1">2.7.0rc1</option>
<option value="2.7.0">2.7.0</option>
<option value="2.6.0rc1">2.6.0rc1</option>
<option value="2.6.0">2.6.0</option>
<option value="2.5.0rc1">2.5.0rc1</option>
<option value="2.5.0">2.5.0</option>
<option value="2.4.0rc1">2.4.0rc1</option>
<option value="2.4.0">2.4.0</option>
<option value="2.3.0rc2">2.3.0rc2</option>
<option value="2.3.0rc1">2.3.0rc1</option>
<option value="2.3.0">2.3.0</option>
<option value="2.2.0rc2">2.2.0rc2</option>
<option value="2.2.0rc1">2.2.0rc1</option>
<option value="2.2.0">2.2.0</option>
<option value="2.1.0rc2">2.1.0rc2</option>
<option value="2.1.0rc1">2.1.0rc1</option>
<option value="2.1.0">2.1.0</option>
<option value="2.0.0rc1">2.0.0rc1</option>
<option value="2.0.0">2.0.0</option>
<option value="1.9.0rc1">1.9.0rc1</option>
<option value="1.9.0">1.9.0</option>
<option value="1.8.1">1.8.1</option>
<option value="1.8.0rc1">1.8.0rc1</option>
<option value="1.8.0">1.8.0</option>
<option value="1.7.0rc1">1.7.0rc1</option>
<option value="1.7.0">1.7.0</option>
<option value="1.6.1">1.6.1</option>
<option value="1.6.0rc1">1.6.0rc1</option>
<option value="1.6.0">1.6.0</option>
<option value="1.5.0rc1">1.5.0rc1</option>
<option value="1.5.0">1.5.0</option>
<option value="1.4.1">1.4.1</option>
<option value="1.4.0rc1">1.4.0rc1</option>
<option value="1.4.0">1.4.0</option>
<option value="1.3.0">1.3.0</option>
<option value="1.2.0">1.2.0</option>
<option value="1.1.0">1.1.0</option>
<option value="1.0.0rc3">1.0.0rc3</option>
<option value="1.0.0rc2">1.0.0rc2</option>
<option value="1.0.0rc1">1.0.0rc1</option>
<option value="1.0.0">1.0.0</option>
<option value="0.9.6">0.9.6</option>
<option value="0.9.5.1">0.9.5.1</option>
<option value="0.9.5">0.9.5</option>
<option value="0.9.4">0.9.4</option>
<option value="0.9.3">0.9.3</option>
<option value="0.9.2">0.9.2</option>
</optgroup>
<optgroup label="Español" value="es"><option value="1.0.0">1.0.0</option></optgroup>
<optgroup label="Français" value="fr">
<option value="1.3.0">1.3.0</option>
<option value="1.2.0">1.2.0</option>
<option value="1.1.0">1.1.0</option>
</optgroup>
<optgroup label="Japanese" value="jp">
<option value="2.2.0">2.2.0</option>
<option value="2.1.0">2.1.0</option>
<option value="2.0.0">2.0.0</option>
<option value="1.9.0">1.9.0</option>
<option value="1.8.1">1.8.1</option>
<option value="1.7.0">1.7.0</option>
<option value="0.9.5">0.9.5</option>
</optgroup>
<optgroup label="Korean" value="kr"><option value="2.0.0">2.0.0</option></optgroup></select></small>
</div>
<div id="subheader">
<h1>Command-Line Usage</h1>
<small><select><option value="Command-Line%2520Usage">Command-Line Usage</option>
<option value="Command-Line%20Usage_supported_platforms"> - Supported Platforms</option>
<option value="Command-Line%20Usage_windows_phone"> - Windows Phone</option>
<option value="Command-Line%20Usage_ios"> - iOS</option>
<option value="Command-Line%20Usage_android"> - Android</option>
<option value="Command-Line%20Usage_blackberry_10"> - BlackBerry 10</option>
<option value="Command-Line%20Usage_create"> - create</option>
<option value="Command-Line%20Usage_target"> - target</option>
<option value="Command-Line%20Usage_build"> - build</option>
<option value="Command-Line%20Usage_run"> - run</option>
<option value="Command-Line%20Usage_plugin"> - plugin</option>
<option value="Command-Line%20Usage_windows_8"> - Windows 8</option></select></small>
</div>
<div id="sidebar">
<div class="vertical_divider"></div>
<h1>API Reference</h1>
<ul>
<li><a href="cordova_accelerometer_accelerometer.md.html#Accelerometer">Accelerometer</a></li>
<li><a href="cordova_camera_camera.md.html#Camera">Camera</a></li>
<li><a href="cordova_media_capture_capture.md.html#Capture">Capture</a></li>
<li><a href="cordova_compass_compass.md.html#Compass">Compass</a></li>
<li><a href="cordova_connection_connection.md.html#Connection">Connection</a></li>
<li><a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></li>
<li><a href="cordova_device_device.md.html#Device">Device</a></li>
<li><a href="cordova_events_events.md.html#Events">Events</a></li>
<li><a href="cordova_file_file.md.html#File">File</a></li>
<li><a href="cordova_geolocation_geolocation.md.html#Geolocation">Geolocation</a></li>
<li><a href="cordova_globalization_globalization.md.html#Globalization">Globalization</a></li>
<li><a href="cordova_inappbrowser_inappbrowser.md.html#InAppBrowser">InAppBrowser</a></li>
<li><a href="cordova_media_media.md.html#Media">Media</a></li>
<li><a href="cordova_notification_notification.md.html#Notification">Notification</a></li>
<li><a href="cordova_splashscreen_splashscreen.md.html#Splashscreen">Splashscreen</a></li>
<li><a href="cordova_storage_storage.md.html#Storage">Storage</a></li>
</ul>
<h1>Guides</h1>
<ul>
<li><a href="guide_overview_index.md.html#Overview">Overview</a></li>
<li><a href="guide_getting-started_index.md.html#Platform%20Guides">Platform Guides</a></li>
<li><a href="guide_cli_index.md.html#The%20Cordova%20Command-line%20Interface">The Cordova Command-line Interface</a></li>
<li><a href="guide_command-line_index.md.html#Command-Line%20Usage">Command-Line Usage</a></li>
<li><a href="guide_privacy_index.md.html#Privacy%20Guide">Privacy Guide</a></li>
<li><a href="guide_upgrading_index.md.html#Upgrading%20Guides">Upgrading Guides</a></li>
<li><a href="guide_project-settings_index.md.html#Project%20Settings">Project Settings</a></li>
<li><a href="guide_plugin-development_index.md.html#Plugin%20Development%20Guide">Plugin Development Guide</a></li>
<li><a href="guide_whitelist_index.md.html#Domain%20Whitelist%20Guide">Domain Whitelist Guide</a></li>
<li><a href="guide_cordova-webview_index.md.html#Embedding%20WebView">Embedding WebView</a></li>
<li><a href="_index.html">Keyword Index</a></li>
</ul>
</div>
<div id="scrollable">
<div id="content">
<h1><a name="Command-Line%20Usage">Command-Line Usage</a></h1>
<p>Cordova now ships with a set of command-line tools that make it easier
for you to develop cross-platform applications. You can build, clean,
and launch an emulator with a single command. You can consider these
instructions as an alternative to the <a href="guide_getting-started_index.md.html#Platform%20Guides">Platform Guides</a>. Whereas
the <a href="guide_getting-started_index.md.html#Platform%20Guides">Platform Guides</a> help you get setup with the default IDEs and
tooling surrounding the platforms you are working with, the command-line
tools aim to provide a shell-based approach to creating and working with
Cordova projects.</p>
<h2>
<a name="Command-Line%20Usage_supported_platforms">Supported Platforms</a>
</h2>
<ul>
<li><a href="#Command-Line%20Usage_ios">iOS</a></li>
<li><a href="#Command-Line%20Usage_android">Android</a></li>
<li><a href="#Command-Line%20Usage_blackberry">BlackBerry</a></li>
<li><a href="#Command-Line%20Usage_blackberry_10">BlackBerry 10</a></li>
<li><a href="#Command-Line%20Usage_windows_phone">Windows Phone</a></li>
<li><a href="#Command-Line%20Usage_windows_8">Windows 8</a></li>
</ul>
<h2>
<a name="Command-Line%20Usage_windows_phone">Windows Phone</a>
</h2>
<p>The Windows Phone command-line tools support creating, building, and
running new projects. Commands must be run from a cmd or powershell prompt.</p>
<p>The WP8 repo now includes code for building both WP7 + WP8 apps.
The repo has subfolders for each: wp7/ and wp8/</p>
<h3>Create a project</h3>
<p>Run the <code>create</code> command with the following parameters:</p>
<ul>
<li>Path to your new Cordova Windows Phone project</li>
<li>Package Name, following reverse-domain style convention ( this becomes the default Namespace )</li>
<li>Project name</li>
</ul>
<!-- --><pre class="prettyprint"><code>// create a new wp8 Cordova project
$ C:\path\to\cordova-wp8\wp8\bin\create C:\path\to\my_new_cordova_project com.example.cordova_project_name CordovaProjectName
// create a new wp7 Cordova project
$ C:\path\to\cordova-wp8\wp7\bin\create C:\path\to\my_new_cordova_project com.example.cordova_project_name CordovaProjectName
</code></pre>
<h3>Building your project (cleans then builds)</h3>
<ul>
<li>Debug</li>
</ul>
<!-- --><pre class="prettyprint"><code>$ C:\path\to\my_new_cordova_project\cordova\build --debug
</code></pre>
<ul>
<li>Release</li>
</ul>
<!-- --><pre class="prettyprint"><code>$ C:\path\to\my_new_cordova_project\cordova\build --release
</code></pre>
<h3>Running your application</h3>
<p>Run the 'run' command with the following <em>optional</em> parameters</p>
<ul>
<li>Target specification. This includes <code>--emulator</code>, <code>--device</code>, or <code>--target=<targetID></code>.</li>
<li>Build specification. This includes <code>--debug</code>, <code>--release</code>, or <code>--nobuild</code>.</li>
</ul>
<!-- --><pre class="prettyprint"><code>$ C:\path\to\my_new_cordova_project\cordova\run [Target] [Build]
</code></pre>
<p>By default the <code>run</code> command will look for a connected device, if no device is found it will look for any started emulators. If you have multiple emulators, you can specify a target ID.</p>
<h3>Cleaning</h3>
<pre class="prettyprint"><code>$ C:\path\to\my_new_cordova_project\cordova\clean
</code></pre>
<h2>
<a name="Command-Line%20Usage_ios">iOS</a>
</h2>
<p>The iOS command-line tools are built upon shell scripts and rely on
Xcode command-line tools such as <code>xcode-select</code> and <code>xcodebuild</code>.</p>
<h3>Create a project</h3>
<p>Run the <code>create</code> command with the following parameters:</p>
<ul>
<li>Path to your new Cordova iOS project</li>
<li>Package name, following reverse-domain style convention</li>
<li>Project name</li>
</ul>
<!-- --><pre class="prettyprint"><code>$ ./path/to/cordova-ios/bin/create /path/to/my_new_cordova_project com.example.cordova_project_name CordovaProjectName
</code></pre>
<h3>Build a project</h3>
<pre class="prettyprint"><code>$ /path/to/my_new_cordova_project/cordova/build
</code></pre>
<h3>Run app on emulator</h3>
<pre class="prettyprint"><code>$ /path/to/my_new_cordova_project/cordova/run
</code></pre>
<h3>Releasing</h3>
<pre class="prettyprint"><code>$ /path/to/my_new_cordova_project/cordova/release
</code></pre>
<h3>Logging</h3>
<pre class="prettyprint"><code>$ /path/to/my_new_cordova_project/cordova/log
</code></pre>
<h2>
<a name="Command-Line%20Usage_android">Android</a>
</h2>
<p>The Android command-line tools are built upon shell scripts. You <em>must</em>
have the Android SDK's <code>tools</code> and <code>platform-tools</code> folders in your
PATH!</p>
<h3>Create a project</h3>
<p>Run the <code>create</code> command with the following parameters:</p>
<ul>
<li>Path to your new Cordova Android project</li>
<li>Package name, following reverse-domain style convention</li>
<li>Main Activity name</li>
</ul>
<!-- --><pre class="prettyprint"><code>$ /path/to/cordova-android/bin/create /path/to/my_new_cordova_project com.example.cordova_project_name CordovaProjectName
</code></pre>
<p>or, on <em>Windows</em></p>
<pre class="prettyprint"><code>$ C:\path\to\cordova-android\bin\create.bat C:\path\to\my_new_cordova_project com.example.cordova_project_name CordovaProjectName
</code></pre>
<h3>Building your project (cleans then builds)</h3>
<ul>
<li><strong>Debug</strong></li>
</ul>
<!-- --><pre class="prettyprint"><code>$ /path/to/my_new_cordova_project/cordova/build --debug
</code></pre>
<p>or, on <em>Windows</em></p>
<pre class="prettyprint"><code>$ C:\path\to\my_new_cordova_project\cordova\build.bat --debug
</code></pre>
<ul>
<li><strong>Release</strong></li>
</ul>
<!-- --><pre class="prettyprint"><code>$ /path/to/my_new_cordova_project/cordova/build --release
</code></pre>
<p>or, on <em>Windows</em></p>
<pre class="prettyprint"><code>$ C:\path\to\my_new_cordova_project\cordova\build.bat --release
</code></pre>
<h3>Running your application</h3>
<p>Run the 'run' command with the following <em>optional</em> parameters</p>
<ul>
<li>Target specification. This includes <code>--emulator</code>, <code>--device</code>, or <code>--target=<targetID></code>.</li>
<li>Build specification. This includes <code>--debug</code>, <code>--release</code>, or <code>--nobuild</code>.</li>
</ul>
<!-- -->
$ /path/to/my_new_cordova_project/cordova/run [Target] [Build]
or, on *Windows*
$ C:\path\to\my_new_cordova_project\cordova\run.bat [Target] [Build]
Make sure you create at least one Android Virtual <a href="cordova_device_device.md.html#Device">Device</a>, otherwise
you're prompted to do so with the `android` command. If you have
multiple AVDs, you're prompted to select one. By default the `run`
command will detect a connected device. When no device is found,
it will detect a running emulator.
### Logging
$ /path/to/my_new_cordova_project/cordova/log
or, on *Windows*
$ C:\path\to\my_new_cordova_project\cordova\log.bat
### Cleaning
$ /path/to/my_new_cordova_project/cordova/clean
or, on *Windows*
$ C:\path\to\my_new_cordova_project\cordova\clean.bat
## BlackBerry
The BlackBerry command-line tools are built upon shell scripts.
### Create a project
Run the `create` command with the following parameters:
* Path to your new Cordova BlackBerry project
* Placeholder package name
* Application name
<!-- -->
<pre class="prettyprint"><code>$ /path/to/cordova-blackberry-webworks/bin/create /path/to/my_new_cordova_project com.example.cordova_project_name CordovaProjectName
</code></pre>
<p>or, on <strong>Windows</strong></p>
<pre class="prettyprint"><code>$ /path/to/cordova-blackberry-webworks/bin/create.bat /path/to/my_new_cordova_project com.example.cordova_project_name CordovaProjectName
</code></pre>
<p><strong>NOTE:</strong> The Blackberry platform ignores the package name placeholder
(<code>com.example.cordova_project_name</code>), but it's still required for use by
cross-platform tools.</p>
<h3>Build a project</h3>
<p>For BlackBerry projects, please make sure you customize the
<code>project.properties</code> file in your Cordova project's root directory.
You need to do so to supply your BlackBerry signing key password, and
specify locations for the BlackBerry WebWorks SDK and BlackBerry
simulator executables.</p>
<pre class="prettyprint"><code>$ /path/to/my_new_cordova_project/cordova/build <platform>
</code></pre>
<p>or, on <strong>Windows</strong></p>
<pre class="prettyprint"><code>$ /path/to/my_new_cordova_project/cordova/build.bat <platform>
</code></pre>
<h3>Launch simulator</h3>
<p>For BlackBerry projects, please make sure you customize the
<code>project.properties</code> file in the root of your Cordova project folder.
You need to do so to supply your BlackBerry signing key password, and
specify locations for the BlackBerry WebWorks SDK and BlackBerry
simulator executables.</p>
<pre class="prettyprint"><code>$ /path/to/my_new_cordova_project/cordova/run <platform>
</code></pre>
<p>and then choose 'no' when prompted with:</p>
<pre class="prettyprint"><code>Do you have a BlackBerry device connected to your computer? (y/n)
</code></pre>
<p>or, on <strong>Windows</strong></p>
<pre class="prettyprint"><code>$ /path/to/my_new_cordova_project/cordova/run <platform>
</code></pre>
<p>and then choose 'no' when prompted with:</p>
<pre class="prettyprint"><code>Do you have a BlackBerry device connected to your computer? (y/n)
</code></pre>
<h3>Logging</h3>
<p>Unfortunately, streaming logs directly from the device is currently
unsupported. However, BlackBerry offers built-in Web Inspector support
for Playbook and BlackBerry smartphone devices running BlackBerry OS
7.0 and above. You can also access your application's logs (including
any calls to <code>console.log</code>) on your device by holding down the ''ALT''
key from the home screen and typing ''lglg'' keys.</p>
<h2>
<a name="Command-Line%20Usage_blackberry_10">BlackBerry 10</a>
</h2>
<p>Command-line tools are based on shell scripts. If you need help with a command, type the command with the <code>-h</code> or <code>-help</code> arguments, which are supported by all commands and which will provide descriptions for each of the available arguments.</p>
<p>The following commands are available:</p>
<h2>
<a name="Command-Line%20Usage_create">create</a>
</h2>
<p>The 'create' command creates a new project:</p>
<p><code>
bin/create <path-to-project>
</code></p>
<h2>
<a name="Command-Line%20Usage_target">target</a>
</h2>
<p>The <code>target</code> command allows you to manage the BlackBerry device(s) or simulator that you will use to test your app. You can add or remove a target, or set a target as the default target.</p>
<h3>Add a target</h3>
<p><code>
<path-to-project>/cordova/target add <name> <ip-address> <device | simulator> [-p | --password <password>] [--pin <device-pin>]
</code></p>
<p>where</p>
<ul>
<li>
<code><name></code> specifies a unique name for the target.</li>
<li>
<code><ip-address></code> specifies the ip address of the BlackBerry device or simulator.</li>
<li>
<code>-p|--password <password></code> specifies the password for the device or simulator. This is required only if the device or simulator is password protected.</li>
<li>
<code>--pin <device-pin></code> specifies the PIN of the BlackBerry device, which identifies that device as a valid host for the debug token. This argument is required only if you are creating a debug token.</li>
</ul>
<h3>Remove a target</h3>
<p><code>
<path-to-project>/cordova/target remove <name>
</code></p>
<h3>Set a target as the default</h3>
<p><code>
<path-to-project>/cordova/target default <name>
</code></p>
<h2>
<a name="Command-Line%20Usage_build">build</a>
</h2>
<p>The <code>build</code> command builds the project as a .bar file. You can build your app in either release mode (which produces a signed .bar file) or in debug mode (which produces an unsigned .bar file).</p>
<h3>Build your project in release mode</h3>
<p><code>
<path-to-project>/cordova/build release -k|--keystorepass <password> [-b|--buildId <number>] [-p|--params <params-JSON-file>]
</code>
where</p>
<ul>
<li>
<code>-k|--keystorepass <password></code> specifies the password you defined when you configured your computer to sign applications.</li>
<li>
<code>-b|--buildId <number></code> specifies the build version number of your application. Typically, this number should be incremented from the previous signed version. This argument is optional.</li>
<li>
<code>-p|--params <params-JSON-file></code> specifies a JSON file containing additional parameters to pass to downstream tools. This argument is optional.</li>
</ul>
<h3>Build your project in debug mode</h3>
<p><code>
<path-to-project>/cordova/build debug [<target>] [-k|--keystorepass <password>] [-p|--params <params-JSON-file>] [-ll|--loglevel <error|warn|verbose>]
</code></p>
<p>where</p>
<ul>
<li>
<code><target></code> specifies the name of a previously added target. If <code><target></code> is not specified, the default target is used, if one has been created. This argument is only required if you want the script to deploy your app to a BlackBerry device or simulator and you have not created a default target. Additionally, if <code><target></code> is a device, then that device must be connected to your computer by USB connection or be connected to the same Wi-Fi network as your computer.</li>
<li>
<code>-k|--keystorepass <password></code> specifies the password you defined when you configured your computer to sign applications. This password is also used to create your debug token. This argument is only required if you want the script to create and install the debug token for you.</li>
<li>
<code>-p|--params <params-JSON-file></code> specifies a JSON file containing additional parameters to pass to downstream tools.</li>
<li>
<code>-ll|--loglevel <level></code> specifies the log level. The log level may be one of <code>error</code>, <code>warn</code>, or <code>verbose</code>.</li>
</ul>
<p>If you have previously defined a default target (and previously installed a debug token, if that target is a BlackBerry device), you can run the script with no arguments, and the script will package your app and deploy it to the default target. For example:</p>
<p><code>
<path-to-project>/cordova/build debug
</code></p>
<h2>
<a name="Command-Line%20Usage_run">run</a>
</h2>
<p>The <code>run</code> command deploys the app on the specified BlackBerry device or a simulator. Before deploying your app, you must first create a target for the device or simulator you want to deploy your app to. The deploy script will deploy the most recent build of your app.</p>
<p><code>
<path-to-project>/cordova/run <target>
</code></p>
<p>where
- <code><target></code>specifies the name of a previously added target. If <code><target></code>is a device, then that device must be connected to your computer by USB connection or be connected to the same Wi-Fi network as your computer.</p>
<h2>
<a name="Command-Line%20Usage_plugin">plugin</a>
</h2>
<p>The <code>target</code> command allows you to add and remove plugins</p>
<h3>Fetch a locally-hosted plugin</h3>
<p><code>
<path-to-project>/cordova/plugin fetch <path-to-plugin>
</code></p>
<h3>View a list of installed plugins</h3>
<p><code>
<path-to-project>/cordova/plugin ls
</code></p>
<h3>Add a plugin</h3>
<p><code>
<path-to-project>/cordova/plugin add <name>
</code></p>
<h3>Remove a plugin</h3>
<p><code>
<path-to-project>/cordova/plugin rm <name>
</code></p>
<h2>
<a name="Command-Line%20Usage_windows_8">Windows 8</a>
</h2>
<p>The Windows 8 command line tools support creating new projects only.
Commands must be run from a cmd or powershell prompt.</p>
<h3>Create a project</h3>
<p>Run the <code>create</code> command with the following parameters:</p>
<ul>
<li>Path to your new Cordova Windows 8 project</li>
<li>Package Name, following reverse-domain style convention ( this becomes the default Namespace )</li>
<li>Project name</li>
</ul>
</div>
</div>
<!-- Functionality and Syntax Highlighting -->
<script type="text/javascript" src="index.js"></script><script type="text/javascript" src="prettify/prettify.js"></script>
</body>
</html>