Apache Cordova Documentation Website

repository·master·Indexed 43 days ago

https://github.com/apache/cordova-docs

Source code and build configuration for the official Apache Cordova website (cordova.apache.org). Includes guidelines for contributing to the documentation and blog, Jekyll configuration, Gulp build processes, and deployment workflows via Travis CI and SVN.

Tokens
148.1K
Snippets
538
Records
928
Agent score
56%

What's inside Apache Cordova

  1. Overview of the Cordova Website repository

    master

    This repository hosts the source code for the official Cordova website (cordova.apache.org). The site is structured as a static site generated using Jekyll.

    Key components include:

    • Homepage and subpages: Located in /www.
    • Documentation: Located in /www/docs.
    • Blog: Located in /www/blog.
    • Plugins: Located in /www/plugins.

    Note that some content is dynamically pulled in during the build process.

  2. New features in cordova-common@2.1.0

    master

    The cordova-common package version 2.1.0 introduced several improvements to configuration parsing and attribute handling:

    • <config-file> Support: Added support for the <config-file> tag within config.xml.
    • Media Access Parsing: Added parsing for the allows-arbitrary-loads-for-media attribute when using getAccesses.
    • Framework Tag Replacement: Introduced a variable to replace the framework tag.
    • JSON Formatting: Standardized JSON output to use 2 spaces for indentation.
  3. Key changes in Cordova Android 7.0.0

    master

    The 7.0.0 release includes several significant updates and breaking changes:

    • Project Structure: Changed to match Android Studio. This is a breaking change for standalone projects and affects file locations.
    • Java Support: Support for Java 1.8 language features in Cordova Plugins.
    • Context Access: CordovaInterface now includes a Context getter, allowing contexts to be retrieved without an Activity.
    • Architecture Support: Support for building x86_64, arm64, and armeabi architectures when building plugins using the NDK.
    • Minimum API Level: The minimum supported Android API version is now API Level 19.
    • Build System: ANT builds are no longer supported and have been removed; the project now uses Gradle/Android Studio structures.
    • Upgrading: In-line upgrading is no longer supported.
  4. New features in Cordova BlackBerry 3.8.0

    master

    The BlackBerry 3.8.0 release includes the following improvements:

    • Cross-OS Support: Ability to add the blackberry10 platform on any workstation OS.
    • Whitelisting: Support for subdomain whitelisting.
    • CSP Updates: Includes http://localhost:8472 in the Content-Security-Policy header.
    • Asset Handling: Support for handling icons located outside of the www/ directory.
    • Bug Fixes: Includes fixes for parseUri handling complex URLs and exception logging in packager.js.
  5. Understand the Cordova project directory structure

    master

    A Cordova project created via the CLI follows a specific directory structure. Understanding these directories is critical for managing assets, configuration, and version control.

    Default Structure

    myapp/
    ├── config.xml
    ├── node_modules/
    ├── package.json
    ├── platforms/
    ├── plugins/
    └── www

    Core Directories

    • www/: The primary location for your web assets (HTML, CSS, JavaScript, images). Always edit files here. These files are automatically copied to each platform's directory during cordova prepare.
    • config.xml: The main configuration file for your application. Use this to define preferences and customize project behavior.
    • package.json: A manifest of your project's JavaScript dependencies (Cordova, platforms, and plugins) and plugin variable values.
    • platforms/: Contains the source code and build scripts for added platforms (e.g., Android, iOS). Warning: Do not edit files here directly; they are routinely overwritten by the CLI.
    • plugins/: A staging area where installed plugins are copied before being applied to platforms. Do not commit this to version control.
    • node_modules/: Contains npm dependency packages for Cordova and your project. This is the unedited source of truth; do not edit files here.
    myapp/
    ├── config.xml
    ├── node_modules/
    ├── package.json
    ├── platforms/
    ├── plugins/
    └── www
  6. Understand Jekyll configuration files for the Cordova Docs website

    master

    The Cordova Docs website uses Jekyll for its build process. Configuration is managed through several YAML files located in the conf/ directory. The specific configuration applied depends on the command used to trigger the build (e.g., gulp build or gulp serve).

    Static Configuration Files

    These files are present in the repository after checkout:

    • _config.yml: The primary Jekyll configuration file.
    • _version.yml: Defines the latest version of the documentation.
    • _dev.yml: Used for default/development builds.
    • _prod.yml: Applied when the --prod option is used during the build.
    • _nodocs.yml: Applied when the --nodocs option is used during the build.

    Generated Configuration Files

    • _defaults.yml: This file is generated by the build process and defines specific configuration values for different sections of the documentation.
  7. Key features in cordova-common 3.0.0

    master

    The cordova-common 3.0.0 release introduced several significant updates to platform handling and utility methods:

    • Plugin Management: Added PluginInfo.getPodSpecs method.
    • Android: Updated ConfigParser to support Adaptive Icons.
    • macOS: Fixed Resolve Config Path for OSX.
    • iOS/Android: Fixed incorrect counts in config_munge within ios.json and android.json.
    • Utilities: Fixed greedy regex issues in plist_helpers and implemented cross-spawn for platform-independent process spawning.
    • Dependencies: Removed the cordova-registry-mapper dependency.
  8. Android platform features in Cordova 3.6

    master

    The Android platform in Cordova 3.6 introduced several key features and fixes:

    • Gradle Support: Added support for Gradle.
    • APK Splitting: Added the BUILD_MULTIPLE_APKS environment variable to allow splitting APKs based on architecture.
    • Whitelist Enhancements:
      • Added external-launch-whitelist for filtering intent launches.
      • Added whitelist entries to support iframe and GoogleMaps.
      • Extended whitelist to handle URLs without // characters.
    • Security: exec() is now restricted to file: or the starting URL's domain.
    • Bug Fixes: Includes fixes for the native-to-JS bridge, android_sdk_version.js error messages, and setNativeToJsBridgeMode crashes.
  9. New utilities in cordova-common 3.2.0

    master

    The cordova-common 3.2.0 release introduced several utility improvements for Cordova tooling, specifically focusing on configuration management and process handling:

    • Preference Management: Implemented setPreference and setPlatformPreference for managing configuration settings.
    • Process Handling: Improved error handling in superspawn by catching leaked exceptions and converting them into rejections, ensuring more predictable asynchronous behavior.
    • iOS Configuration: Fixed plist document indentation issues.
    • Dependency Update: Updated fs-extra to v8.
  10. What's new in cordova-ios 4.0.0

    master

    The cordova-ios 4.0.0 release introduced several significant changes and improvements:

    Core Platform Changes

    • Minimum iOS Version: The minimum deployment target has been updated to iOS 8.0 (previously iOS 7.0).
    • Asset Catalog Support: Added support for using Asset Catalogs for app icons and splashscreens.
    • Swift Support: Added a bridging header and Swift runtime to the search path to support Swift-based plugins.
    • Build System: Moved most build settings from .pbxproj to .xcconfig files and implemented cordova/build*.xcconfig support for better IDE integration.
    • Plugin Architecture: Many features previously handled in the core AppDelegate (like handleOpenURL and push notification delegates) have been moved to dedicated plugins.
    • Whitelist Changes: The old iOS whitelist has been removed in favor of updated handling of <allow-navigation> and <allow-intent> tags.

    Technical Improvements

    • Bridge Proxy: Added a bridge proxy to improve communication between the webview and native code.
    • Platform API: Implemented and exposed the PlatformApi for iOS.
    • Dependency Updates:
      • ios-sim updated to 5.0.3
      • ios-deploy updated to 1.7.0
      • xcodebuild updated to 6.0.0
    • Bug Fixes: Addressed issues with magnifying glass popups on iOS 9, URL parsing in CDVWhiteList, and deployment issues with Unicode characters in display names.
  11. Key features of Cordova Electron 1.0.0

    master

    The cordova-electron platform provides the following capabilities for building desktop applications:

    • Electron Version: Uses Electron v4.0.1.
    • Build Support: Utilizes electron-builder@^20.38.4 to support Linux, macOS, and Windows, including signing for macOS and Windows.
    • Assets: Supports App and Installer icons.
    • Execution: Supports the run command for app previewing.
    • Plugins: Supports Cordova plugins, including those with browser support.