Skip to content

Commit

Permalink
doc: various improvements for 12.x docs (#1330)
Browse files Browse the repository at this point in the history
* doc: improve app template page
* doc: remove mention of deprecated globalization plugin
* doc: update splashscreen link on platform support
* doc(ios): refactor requirements and support section
* doc(menu): relabel Introduction to Getting Started
* doc(menu): move & relabel Creating an App to Getting Started
* doc(menu): create & move project related items to Cordova Projects
* doc(menu): relabel Platform Support
* doc(menu): relabel Platform Pinning
* doc(menu): relabel Version Management
* doc(menu): relabel section Create Apps to App Development
* doc(menu): move Platform App Development section
* doc(menu): update App Development items order, labels & sections
* doc(menu): relabel Plugin Development section
* doc(menu): update Plugin Development item labels
* doc(menu): remove Windows from Plugin Development
* doc(menu): move References below Plugin Development
* doc(menu): create Resources section
* doc(menu): move Plugins section below Resources
* doc(menu): relabel References section items
* doc(menu): relabel App Templates
* doc(menu): add installation page
* doc(top-page): remove hidden deprecated platforms
* doc(storage): remove windows platform information
  • Loading branch information
erisu authored Sep 6, 2023
1 parent d461f83 commit 5c70ec2
Show file tree
Hide file tree
Showing 18 changed files with 259 additions and 164 deletions.
106 changes: 60 additions & 46 deletions www/_data/toc/en_dev-src.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,85 @@
-
name: Introduction
name: Getting Started
children:
- url: guide/overview/index.html
- url: guide/cli/installation.html
- url: guide/cli/index.html

-
name: Create apps
name: Cordova Projects
children:
- url: guide/cli/index.html
- url: guide/cli/template.html
- url: reference/cordova-cli/index.html
- url: guide/support/index.html
- url: third-party/index.html
- url: platform_pinning/index.html
- url: platform_plugin_versioning_ref/index.html
- url: guide/appdev/hooks/index.html

-
name: App Development
children:
-
name: Develop for platforms
name: Platforms
children:
- url: guide/platforms/android/index.html
- url: guide/platforms/ios/index.html
- url: guide/platforms/windows/index.html
- url: guide/platforms/osx/index.html
- url: guide/platforms/electron/index.html
- url: platform_plugin_versioning_ref/index.html
- url: platform_pinning/index.html
- url: config_ref/images.html
-
name: Customization
children:
- url: config_ref/images.html
- url: core/features/splashscreen/index.html
-
name: Security & Privacy
children:
- url: guide/appdev/security/index.html
- url: guide/appdev/privacy/index.html
- url: guide/appdev/allowlist/index.html
- url: cordova/storage/storage.html
- url: guide/appdev/privacy/index.html
- url: guide/appdev/security/index.html
- url: guide/appdev/allowlist/index.html

-
name: Create plugins
name: Plugin Development
children:
- url: guide/hybrid/plugins/index.html
-
name: Develop for platforms
name: Support a Platform
children:
- url: guide/platforms/android/plugin.html
- url: guide/platforms/ios/plugin.html
- url: guide/platforms/windows/plugin.html
- url: plugin_ref/plugman.html

-
name: Advanced Topics
name: References
children:
- url: guide/hybrid/webviews/index.html
- url: config_ref/index.html
- url: plugin_ref/spec.html
- url: cordova/events/events.html

-
name: Resources
children:
- url: third-party/index.html
- url: guide/cli/template.html
- url: guide/next/index.html

-
name: Reference
name: Plugins
children:
- url: config_ref/index.html
- url: cordova/events/events.html
- url: reference/cordova-cli/index.html
- url: guide/appdev/hooks/index.html
-
name: Core Features
children:
- url: core/features/splashscreen/index.html
- url: plugin_ref/spec.html
-
name: Plugins
children:
- url: reference/cordova-plugin-battery-status/index.html
- url: reference/cordova-plugin-camera/index.html
- url: reference/cordova-plugin-device/index.html
- url: reference/cordova-plugin-dialogs/index.html
- url: reference/cordova-plugin-file/index.html
- url: reference/cordova-plugin-geolocation/index.html
- url: reference/cordova-plugin-inappbrowser/index.html
- url: reference/cordova-plugin-media/index.html
- url: reference/cordova-plugin-media-capture/index.html
- url: reference/cordova-plugin-network-information/index.html
- url: reference/cordova-plugin-screen-orientation/index.html
- url: reference/cordova-plugin-splashscreen/index.html
- url: reference/cordova-plugin-statusbar/index.html
- url: reference/cordova-plugin-vibration/index.html
- url: reference/cordova-plugin-battery-status/index.html
- url: reference/cordova-plugin-camera/index.html
- url: reference/cordova-plugin-device/index.html
- url: reference/cordova-plugin-dialogs/index.html
- url: reference/cordova-plugin-file/index.html
- url: reference/cordova-plugin-geolocation/index.html
- url: reference/cordova-plugin-inappbrowser/index.html
- url: reference/cordova-plugin-media/index.html
- url: reference/cordova-plugin-media-capture/index.html
- url: reference/cordova-plugin-network-information/index.html
- url: reference/cordova-plugin-screen-orientation/index.html
- url: reference/cordova-plugin-splashscreen/index.html
- url: reference/cordova-plugin-statusbar/index.html
- url: reference/cordova-plugin-vibration/index.html

-
name: Advanced Topics
children:
- url: guide/hybrid/webviews/index.html
6 changes: 3 additions & 3 deletions www/docs/en/dev/config_ref/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ license: >
specific language governing permissions and limitations
under the License.
title: Customize app icons
toc_title: Customize icons
title: Customize App Icons
toc_title: Icons
description: Learn how to customize icons for your Cordova application.
---

{% cdv_platform inject %}

# Customize Icons
# Icons

This section shows how to configure an application's icon for various platforms. Documentation about splash screen images can be found in the Cordova-Plugin-Splashscreen documentation [Splashscreen plugin docs][splashscreen_plugin].

Expand Down
4 changes: 2 additions & 2 deletions www/docs/en/dev/config_ref/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ license: >
specific language governing permissions and limitations
under the License.
title: Config.xml
title: Config.xml API
description: List of supported tags in the config.xml file.
---

{% cdv_platform inject %}

# Config.xml
# Config.xml API

The `config.xml` file is a global configuration file that manages various aspects of a Cordova application's behavior. It is written in XML format and follows the structure outlined in the W3C's [Packaged Web Apps (Widgets)](https://www.w3.org/TR/widgets/) specification. Additionally, it is extended to include core Cordova API features, plugins, and platform-specific settings.

Expand Down
2 changes: 1 addition & 1 deletion www/docs/en/dev/cordova/events/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ license: >
specific language governing permissions and limitations
under the License.
title: Events
title: Cordova JavaScript API
description: List of Cordova JavaScript run-time events.
---

Expand Down
21 changes: 4 additions & 17 deletions www/docs/en/dev/cordova/storage/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ license: >
specific language governing permissions and limitations
under the License.
title: Storage
toc_title: Store data
title: Data Storage
toc_title: Data Storage
description: Storing data on the device.
---

# Storage
# Data Storage

Several storage APIs are available for Cordova applications.
See html5rocks [storage overview][Html5RocksStorageOverview] and
Expand Down Expand Up @@ -86,27 +86,14 @@ IndexedDB provides a simple and easy to understand data model, much like LocalSt
But unlike LocalStorage, you can create multiple databases, with multiple stores per
database, and its asynchronous API and search indexes provide performance benefits.

IndexedDB is supported by the underlying WebView on all platforms, with known limitations on the following platforms:

- browser
- Windows
IndexedDB is supported by the underlying WebView on all platforms, with known limitations on the `browser` platform.

### Web browser limitations

The actual behavior may depend on which browser is used.
There could be differences between the behavior on the Safari and Firefox browsers,
for example.

### Windows Limitations

Windows platform support for IndexedDB is incomplete. For example, it lacks
the following features:

- Not available in web workers.
- Doesn't support array keyPaths.
- Doesn't support array keys.
- Doesn't support object lookup via compound index.

### Usage Summary

- IndexedDB works asynchronously - you request a particular database
Expand Down
4 changes: 2 additions & 2 deletions www/docs/en/dev/guide/appdev/allowlist/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ license: >
specific language governing permissions and limitations
under the License.
title: Allow List Guide
title: Manage App's Allow List
toc_title: Allow List
description: Securely grant an application access to external resources.
---

# Allow List Guide
# Allow List

Domain allow listing is a security model that controls access to external domains over which your application has no control. Cordova provides a configurable security policy to define which external sites may be accessed.

Expand Down
6 changes: 3 additions & 3 deletions www/docs/en/dev/guide/appdev/privacy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ license: >
specific language governing permissions and limitations
under the License.
title: Privacy Guide
toc_title: Manage privacy
title: Manage App's Privacy
toc_title: Privacy
description: Learn about important mobile privacy issues.
---

# Privacy Guide
# Privacy

Mobile privacy is a critical issue that every app developer must
address. Your users expect that their private information will be
Expand Down
6 changes: 3 additions & 3 deletions www/docs/en/dev/guide/appdev/security/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ license: >
specific language governing permissions and limitations
under the License.
title: Security Guide
toc_title: Manage security
title: Manage App's Security
toc_title: Security
description: Information and tips for building a secure application.
---

# Security Guide
# Security

The following guide includes some security best practices that you should consider when developing a Cordova application. Please be aware that security is a very complicated topic and therefore this guide is not exhaustive. If you believe you can contribute to this guide, please feel free to create a pull request in Cordova's [cordova-docs](https://github.com/apache/cordova-docs/issues) repository. This guide is designed to be applicable to general Cordova development (all platforms) but special platform-specific considerations will be noted.

Expand Down
48 changes: 9 additions & 39 deletions www/docs/en/dev/guide/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,58 +17,28 @@ license: >
specific language governing permissions and limitations
under the License.
title: Creating your first Cordova app
title: Creating an App
description: Learn how to create your first Cordova hybrid app using Cordova CLI.
toc_title: Create your first app
toc_title: Creating an App
---

# Create your first Cordova app
# Creating an App

This guide shows you how to create a JS/HTML Cordova application and deploy them to various native mobile platforms using the `cordova` command-line interface (CLI). For detailed reference on Cordova command-line, review the [CLI reference]

## Installing the Cordova CLI
## Creating the Cordova Project Space

The Cordova command-line tool is distributed as an npm package.
In terminal, go to the directory where you would like to create your Cordova's project.

To install the `cordova` command-line tool, follow these steps:

1. Download and install [Node.js](https://nodejs.org/en/download/). On installation you should be able to invoke `node` and `npm` on your line.

1. (Optional) Download and install a [git client](http://git-scm.com/downloads), if you don't already have one. Following installation, you should be able to invoke `git` on your command line. The CLI uses it to download assets when they are referenced using a url to a git repo.

1. Install the `cordova` module using `npm` utility of Node.js. The `cordova` module will automatically be downloaded by the `npm` utility.

- on macOS and Linux:

```bash
npm install -g cordova
```

For macOS and Linux users, you might need to use the `sudo` prefix when running the `npm` command to install this utility in restricted directories like `/usr/local/share`. However, if you are using the optional nvm/nave tool or have write access to the installation directory, you may be able to omit the `sudo` prefix.

It is also worth noting that it is generally recommended to avoid using `sudo` with `npm` to prevent potential issues with permissions and package installations.

Instead, it's recommended to use a version manager like nvm (Node Version Manager) or nave to manage Node.js and npm installations, which typically avoids the need for `sudo` when installing packages.
- on Windows:
```bash
C:\>npm install -g cordova
```
The `-g` flag above tells `npm` to install `cordova` globally. Otherwise it will be installed in the `node_modules` subdirectory of the current working directory.
Following installation, you should be able to run `cordova` on the command line with no arguments and it should print help text.
## Create the App
Go to the directory where you maintain your source code, and create a cordova project:
Note that the next command will create a new project directory where your source code, resource files, configuration, and build artifacts will reside.

```bash
cordova create hello com.example.hello HelloWorld
```

This creates the required directory structure for your cordova app. By default, the `cordova create` script generates a skeletal web-based application whose home page is the project's `www/index.html` file.
The above command will create a project directory named "hello" with the required directory structure for your Cordova app.

By default, the `cordova create` script generates a skeletal web-based application where the apps landing page is the project's `www/index.html` file.

### See Also

Expand Down
Loading

0 comments on commit 5c70ec2

Please sign in to comment.