dart-lang/chromedeveditor — pull request #3576 by ussuri (2014-10-23 00:11:45+00:00)
Title: Bower: support for hierarchical .bowerrc + some fixes

@devoncarew

Devon, sorry for a somewhat largish CL: it's as small as I could get it (except a few cleanups that I couldn't resist).

* _BowerBulder monitors changes in .bowerrc files in a project's hierarchy, reads the configurations from them, and stores them in the respective Folders' metadata.
* BowerProperties. getPackagesDirName() uses the above to merge the configurations in a Resource's hierarchical parents and return the resulting target directory name.
* The initialization sequence in Spark ctor is updated to ensure that _BowerBuilder gets created after the workspace is restored, so it can do an initial processing of any .bowerrc's in all the projects. The new sequence also has a side benefit of running almost all the steps after SparkFlags have been updated from /.spark.json, so the flags can be used almost everywhere now.
* Pub/Bower downloaders wait for Pub/Bower builders to finish before downloading: that's important because the target directory for Bower can now change based on .bowerrc's.
* The project template intros are displayed only after all of the above is completed: this fixes a UX issue where the user, following a premature intro message, would run "Refactor for CSP" on a still-downloading bower_components folder.

Fixes #2044.
Possibly fixes #3502.