[wp-trac] [WordPress Trac] #47767: Simplify and backport the local environment

WordPress Trac noreply at wordpress.org
Thu Jul 25 05:40:59 UTC 2019


#47767: Simplify and backport the local environment
-------------------------------------+-----------------------
 Reporter:  pento                    |       Owner:  pento
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  5.3
Component:  Build/Test Tools         |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  needs-testing has-patch  |     Focuses:
-------------------------------------+-----------------------

Comment (by noisysocks):

 I love this! A useful development environment that works right out of the
 box is really going to help onboard new developers, especially Gutenberg
 contributors that might want to have a try at contributing upstream.

 Everything I'd use for day-to-day development works great:

 {{{
 $ npm install
 $ npm env:start
 $ npm env:install
 $ npx grunt watch --dev
 $ npm run env:cli shell
 wp> get_option( 'admin_email' )
 => string(13) "test at test.com"
 }}}

 I also checked that the E2E tests still run fine.

 I have not tested this on Windows.

 Some loose thoughts:

 1. Documentation in the handbook for all of this functionality will go a
 long way.
 2. It would be nice if getting unit tests set up weren't left as an
 exercise for the reader. Perhaps this is best addressed with some nice
 documentation, as above.
 2. It feels awkward to me that `npm run dev` is an alias for `grunt build
 --dev` instead of `grunt watch --dev`, as I'm coming from Gutenberg where
 `npm run dev` watches for changes.
 3. I'd like if we didn't need to define `-next` commands in the
 `package.json`, so that running `npm run` would display the commands that
 can be run and nothing else. I assume this is a `dotenv-cli` limitation,
 though?

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


More information about the wp-trac mailing list