added cordova8 proposal
Some ideas we have for the next major version of cordova. Thoughts?
Let me know what points need discussing in more detail.
To the extent that we're using npm now for managing platforms and plugins, do we actually need a cordova install command or is npm install sufficient? I guess the issue is the step of actually creating the platforms/[whatever] folders?
Removing platforms is a much bigger refactor I think. All the platform create scripts need to output the templates, cordova.js, other build artifacts to some location. We do directly call the create scripts from node_modules/<platform>, but those create scripts then output to the platforms directory. Platforms directory is essentially our dist/build directory. You can get access to generated Xcode/android studio projects. It could be something we look at down the line though.
Just realized I should probably also add moving plugin/platform dependencies out of config.xml and have them only in package.json. Stop the auto syncing of config.xml and package.json. This currently happens during the restore step in cordova prepare.
Yeah, I'm not currently suggesting getting rid of the platforms folder, just wondering if it is created by cordova install or by cordova prepare? If it is created by cordova prepare, do we need cordova install at all?
I am in favour of all of these points. But oof, that seems like a whole lotta work. All for the better, I think!
@dpogue on the topic of install vs. prepare, I'd like to point out that stuffing more of this functionality into prepare is what spurred the discussion in the first place, as per a comment on the install proposal: "I agree that [restore] has been a horrible source of bugs, and still isn't quite right."
@stevengill brought up a good point in that discussion that install feels like the right place to do project-setup type actions, rather than again stuffing into prepare.
Finally, I'd like to point to my comment in that proposal to highlight that we should strive to keep the design of cordova-lib consistent. In order keep the prepare command true to its initial design, we should keep pre-compilation steps encapsulated in prepare (needed due to the abstracted-above-platform-specifics nature of cordova). As @stevengill pointed out, providing an API like install keeps the workflow or setup-specific tasks like pulling in dependencies and creating project configuration separate from prepare's pre-compilation/build tasks.
To your question about whether we can get away with just running npm install: I think encapsulating install/post-install commands in a cordova install comamnd, and mirroring npm in that way, provides us a great stepping stone for eventually automatically running cordova install after an npm install (via npm scripts, for example). Worth exploring that more.
I would suggest any further discussion on the implementation details / specifics of install be debated in #54 instead of here. We can always bring the decisions / suggestions from that discussion back here (where prepare vs. install is only a subset of the larger changes being deliberated).
Should we merge, close, or do something else with this one?