HaNdTriX / generator-chrome-extension-kickstart

Scaffold out a Web Extension http://yeoman.io
MIT License
239 stars 33 forks source link

Iterate recursively to handle vendor-specific keys #11

Closed oori closed 8 years ago

oori commented 8 years ago

This resolves child keys, for example:

{
 "browser_action": {
    "default_popup": "pages/popup.html",
    "__firefox__browser_style": true
  },
  "options_ui": {
    "page": "pages/options.html",
    "__chrome__chrome_style": true
  },
  "__firefox__applications": {
    "...": "..."
  }
}

Note, if there's a prefix-vendor match, we don't iterate on child keys, it doesn't make sense. if the parent key is already vendor-specific, its children keys don't need to be prefixed.

HaNdTriX commented 8 years ago

Thanks, never thought of this use case. This is pretty cool! 👍