I have lightning components developed in our dev org. I want to put them in packaging org to package and distribute it(in test sandboxes first through beta managed package). Now as they have been developed in dev org that did not have a namespace, all dependencies, attribute types, controllers, event handlers etc , all are coded as per default case as mentioned in 1st part of this documentation:
But now to package and distribute it, it is required that all should have namespace of packaging org as mentioned in 2nd part of documentation above. If I change the namespace, it won't work in dev org. So the question is how to dynamically assign namespace.
One approach I can think is copying all code in packaging org, and then changing all namespaces to new namespace, which would result in 2 copies of code. Don't know if that is correct approach.
I found some workarounds for field names refereed in JavaScript and labels used in JavaScript, but for other 12-13 aspects mentioned in above documentation, require a permanent approach. Or is it that for each of these, need to find out a new workaround(like using wrapper class for field names or maps for labels?)
As I read here , and if I am not wrong, lightning components should be developed in DE org WITH A NAMESPACE. So that means I would need to develop my components in packaging org itself?