-
Notifications
You must be signed in to change notification settings - Fork 247
Draft implementation for Unified platform API #226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
`platforms` property now returns array of platforms APIs
* Renames common methods' names to be more JS-y * Provides mapping from old names -> new ones to smooth transition
* Moves compat-related functionality to separate section * Adds more comments for better understanding
value: new ParserHelper(this.platform), | ||
enumerable: true, | ||
configurable: false, | ||
writable: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The writeable/configurable:false, has the tendency to interfere with jasmine spies which causes our tests to fail with very obscure error messages. Just in case you encounter such errors, otherwise I'm all for leaving this as false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can always change behavior of parser
if we'll have any problems later so i would prefer to leave it as-is.
Looks great! |
PlatformHandler.prototype.updateWww = function() { | ||
var projectRoot = util.isCordova(this.root); | ||
var appWww = util.projectWww(projectRoot); | ||
var platformWww = path.join(this.root, 'platform_www'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we would like to avoid using util.isCordova() here. One can easily create single platform projects that do not maintain the traditional Cordova Project directory structure. Kind of like it was with plugman based workflow or with my latests attempts at the gulp based workflow.
Myabe just pass the appWww as a parameter to this function, and for now as a compatibility feature, get it from util.isCordova() if it's not provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
Yeah, reworking tests will be painful. |
Draft implementation of Unified Platform API for cordova, that inspired by this thread in cordova-dev mailing list and this proposal