[buddypress-trac] [BuddyPress Trac] #5160: Use gruntjs to generate minified versions of the js and css files everywhere.

buddypress-trac noreply at wordpress.org
Mon May 5 12:30:39 UTC 2014


#5160: Use gruntjs to generate minified versions of the js and css files
everywhere.
-------------------------+------------------
 Reporter:  enej         |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  2.1
Component:  Core         |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------

Comment (by DJPaul):

 Thanks for your contributions, netweb. I've worked through them; some I've
 committed into trunk, but some need further discussion. I think generally
 we would like separate tickets for each proposed change to Grunt, as Trac
 makes it hard to have multiple conversations about multiple changes on the
 same ticket, and it's hard to keep track of them. ;)

 Consistency with WordPress' Grunt process is a stronger argument than
 being consistent with bbPress', as bbPress' adoption of Grunt is still
 pretty new and will likely be iterated on as better ways of working are
 discovered. We shouldn't hold some idea that it's important for our build
 scripts to be 100% identical with our sister projects'; we can't let that
 stop us from adopting changes that work best for BuddyPress.

 For the patches I'm about to discuss, unless you beat me to it, I'll open
 new tickets for each and move the patches and comments across, so we can
 discuss there.


 5160-php56.diff / PHP 5.6

  * Do you have any context for this change?
  * If the tests are failing on 5.6, why? Aren't those bugs we need to fix?
 ;)

 5160-makepot.diff

  * AFAIK, we haven't turned off potbot yet.
  * We shouldn't remove the `bp-languages` folder until that's done,
 because otherwise it might break things.
  * `bp_core_load_buddypress_textdomain()` also needs updating.
  * I don't think generating the POT on every main Grunt task is a good
 idea, because it's not very fast -- plus those changes aren't included in
 this patch?
  * Switching the CWD from SOURCE to BUILD will cause trunk to not contain
 any POT file which will break GlotPress (the `build` folder is not being
 added to trunk).
  * From this patch, I think the idea to update the headers and move the
 POT to the root of `src` is great. Everything else, not so sure yet. :)

 5160-remove-rtl-css.diff

  * The core team had (unfortunately, in private -- sorry) previously
 decided to keep RTL CSS files in trunk, mainly to support contributions to
 the project from people who expect RTL.
  * I think this change will be a `wontfix`, but a new ticket would be the
 place to have a discussion about this if you feel strongly.

 5160-watch.diff

  * This patch has a dependency on the `BP_LTR_CSS` change which I don't
 think is necessary for BuddyPress to adopt (that looks like it was
 originally taken from the `bp-grunt-lite` experiment on Github, which has
 its own problems), and at any rate, that would have to be done before this
 patch could go in.
  * This is another great patch but it will have to be rewritten to remove
 dependencies on other patches, with careful consideration given to the
 effects of the proposed CWD change.

 5160-grunt-build.diff

  * Probably unlikely to be adopted initially until we have some real-world
 experience with how the existing workflow changes affect core
 development/contributions, before we iterate.
  * I am particularly concerned with the extra time that the new `grunt`
 tasks would take to run, and why we'd want to generate a release build
 here:
   * For the record, `grunt` (aka `grunt build`) is meant to be run
 periodically as you're working on a change. In essence, all of the
 `grunt:watch` tasks should also be run by `grunt build`. They're intended
 to be complementary, or a different way of doing the same thing. As such,
 `grunt build` should be super super quick to run and not cause the person
 running the command to get annoyed by any delay.
   * `grunt build-commit` is meant to be run just before a committer
 commits a change. It's OK if this command takes longer to run; it doesn't
 need to be quick.
   * `grunt build-release` is meant to be run by a lead developer as we
 generate a alpha/beta/release version, or perhaps by anyone who wants to
 run the most cutting-edge BuddyPress without having all the `src` junk,
 for whatever other reason. It can take as long as it needs to run, which
 is why this is the only default build command that runs our unit tests.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5160#comment:49>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list