cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Treggiari, Leo" <leo.treggi...@intel.com>
Subject Questions re: plugin variables
Date Wed, 05 Nov 2014 22:28:17 GMT
I'm having a hard time understanding exactly how plugin variables work.  It's probably a level
of detail that only plugin developers and tool developers need to be concerned about.  I'd
appreciate it if someone can give me the answers.

1.  "variables can be indicated by a dollar-sign followed by a series of capital letters,
digits, or underscores."
     "To make the variable mandatory, the <platform> tag needs to contain a <preference>
tag."
     Does this mean that there are optional and required variables - i.e?
      -  A variable reference is defined by a lexical element which begins with a $ and is
followed only by capital letters, digits, or underscores?
      -  A variable is made mandatory by the presence of a <preference> tag which uses
the same name with the $ removed?
      -  Can this <preference> tag be anywhere in the plugin.xml file, or must it be
the direct child of the <plugin> element or
         a <platform> element?
      -  Can the variable references be anywhere or only within strings?

2.  Where and when are the variables replaced by their value?
      -  plugin.xml is the only place that the variable value is used and only for replacing
the variable references?
      -  When in Cordova CLI do the values get applied - during "add", during "prepare"?

3.   What happens if you combine dependencies with variables.  For example, suppose A depends
on B, and B requires a variable X.  How do you supply the value?

Thanks,
Leo


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message