Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-4591

Have hooks receive which platform the project command is executing for

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.9.0
    • Fix Version/s: None
    • Component/s: cordova-cli
    • Labels:
      None
    • Environment:

      Cordova CLI 2.9.7

      Description

      Right now, project level hooks only get the base project directory as a parameter. There are cases where it would be useful to know which platform the operation was taking place on. (I did see a bug about module level hooks: https://issues.apache.org/jira/browse/CB-3929 but that doesn't seem to apply.)

      For instance, right now I'm trying to integrate flurry into my phonegap app. I have different keys for my two platforms, and want to inject the correct key into my javascript via a hook.

      There are no easy workarounds because hooks might be executed during 'cordova prepare' that might prepare two different platforms.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                filmaj Filip Maj
                Reporter:
                mooreds Dan Moore
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: