[wp-trac] [WordPress Trac] #23912: Add Composer package description

WordPress Trac noreply at wordpress.org
Mon Jan 20 23:52:20 UTC 2014


#23912: Add Composer package description
-------------------------+-----------------------------
 Reporter:  Rarst        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Build Tools  |     Version:  3.5
 Severity:  trivial      |  Resolution:
 Keywords:               |
-------------------------+-----------------------------

Comment (by bpetty):

 Replying to [comment:83 JohnPBloch]:
 > Replying to [comment:80 bpetty]:
 > > Yep. Not arguing that. My patch didn't include it there, but I did say
 that I think it should be there. I just want to see it done in a way that
 we avoid maintaining mostly duplicate package files in the develop root as
 well as the src root (i.e. building an automated grunt task that generates
 the src version from the main root package file with one simple package
 name change).
 >
 > Could you elaborate please? I'm not sure what you mean RE: generates the
 src. version and package name change.

 There's good reasons for having two composer.json files because we have
 two root folders for WP: (1) the root of
 `develop.svn.wordpress.org/trunk`, and (2) the root of
 `core.svn.wordpress.org/trunk` (or just
 `develop.svn.wordpress.org/trunk/build` if you prefer to think about it
 that way).

 The former is useful if you have good reasons for pulling in pre-compiled
 JS or (more likely) SASS/CSS, or if you need to pull in the unit testing
 framework (imagine plugins/themes with their own grunt tasks that use
 future wp-admin SASS mixins for example, or plugin unit tests run on
 Travis CI). The latter is obviously the main version most likely to be
 used though.

 Regardless though, the `build` directory (and thus core.svn) is sort of
 "special" now anyway, and requires the composer.json file be copied over
 from `src` as it is already. Rather than do that though, I'm just thinking
 a Grunt task that copies it from the root of `develop.svn.wp.org/trunk`
 instead of `src` since we could use it there anyway, and just rename the
 package so either can be used the same way. Considering our current
 convention with WP version names with this changed came out with appending
 `-src` for `develop.svn` checkouts, I imagine this might end up with one
 package called `wordpress/wordpress-core` for the copy under `build` while
 the root `develop.svn` copy was `wordpress/wordpress-core-src` for
 example.

 I just don't want to see duplicate composer.json files that are almost
 exactly the same under the `src` folder as the parent folder, that would
 require editing both files manually with any changes. That's all. We can
 do all this with Grunt, I'm just not bothering with the patch until we
 have the other issues here resolved.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/23912#comment:88>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list