[ https://issues.apache.org/jira/browse/CB-4591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13741210#comment-13741210 ]
Dan Moore commented on CB-4591: ------------------------------- After some thought, I guess the obvious workaround is to put both variables in the javascript and then choose which one via device.platform, but it sure would be nice to do that at build time rather than runtime. > Have hooks receive which platform the project command is executing for > ---------------------------------------------------------------------- > > Key: CB-4591 > URL: https://issues.apache.org/jira/browse/CB-4591 > Project: Apache Cordova > Issue Type: New Feature > Components: CLI > Affects Versions: 2.9.0 > Environment: Cordova CLI 2.9.7 > Reporter: Dan Moore > Assignee: Filip Maj > Priority: Minor > > 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. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira