[wp-trac] [WordPress Trac] #35338: Modified source files after cloning the development repository and then running npm install and grunt build

WordPress Trac noreply at wordpress.org
Thu Jan 7 04:42:08 UTC 2016


#35338: Modified source files after cloning the development repository and then
running npm install and grunt build
------------------------------+-------------------------
 Reporter:  henry.wright      |       Owner:
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:  worksforme
 Keywords:                    |     Focuses:
------------------------------+-------------------------
Changes (by netweb):

 * status:  new => closed
 * version:  trunk =>
 * resolution:   => worksforme
 * milestone:  Awaiting Review =>


Comment:

 If you run `grunt watch` or possibly a combination of the `browserify`
 task or a failed `grunt build` task you'll end up with those 4 files with
 a modified status. When "watching" the files with `grunt watch` JS source
 maps are created which is what your seeing in [attachment:35338.diff].

 Here's my output on a fresh Git checkout after running `npm install` and
 `grunt build` and then running `grunt watch`:

 {{{
 #!sh
 netweb at MacBook ~/dev/develop.git.wordpress.org [master]
 $ grunt watch
 Running "watch" task

 Running "browserify:audiovideo" (browserify) task
 >> Bundle src/wp-includes/js/media-audiovideo.js created.

 Running "browserify:grid" (browserify) task
 >> Bundle src/wp-includes/js/media-grid.js created.

 Running "browserify:models" (browserify) task
 >> Bundle src/wp-includes/js/media-models.js created.

 Running "browserify:views" (browserify) task
 >> Bundle src/wp-includes/js/media-views.js created.

 Running "_watch" task
 Waiting...
 ^C

 netweb at MacBook ~/dev/develop.git.wordpress.org [master]
 $ gs
 On branch master
 Your branch is up-to-date with 'origin/master'.
 Changes not staged for commit:
   (use "git add <file>..." to update what will be committed)
   (use "git checkout -- <file>..." to discard changes in working
 directory)

         modified:   src/wp-includes/js/media-audiovideo.js
         modified:   src/wp-includes/js/media-grid.js
         modified:   src/wp-includes/js/media-models.js
         modified:   src/wp-includes/js/media-views.js

 no changes added to commit (use "git add" and/or "git commit -a")

 netweb at MacBook ~/dev/develop.git.wordpress.org [master]
 $

 }}}

 To resolve this run `grunt precommit` which will clean up after the above.

 It would be great if `grunt watch` had a more graceful exit procedure
 rather than having to CTRL-C out of it but sadly `grunt-contrib-watch`
 does not have anything like this at this stage.

 Closing this as `worksforme`, which is by no means is this an ideal
 resolution either.

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


More information about the wp-trac mailing list