[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 07:29:40 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:
------------------------------+-------------------------

Comment (by netweb):

 Replying to [comment:6 henry.wright]:
 > @netweb running {{{grunt precommit}}} resulted in a clean working copy.
 >
 > Why is {{{grunt precommit}}} preferable to {{{git checkout -- .}}}?
 The key here is to have a Grunt task run `grunt browserify` to restore the
 files to the "pre watched state", `grunt precommit` includes that task in
 its set of tasks run.

 I suggested `grunt precommit` over `grunt browserify` because we should
 try to minimise the number of grunt tasks we need to remember, `grunt
 build`, `grunt test`, and `grunt precommit` cover 99% of the build tool
 functionality, so only having remember 3 tasks over ~20 tasks is
 preferable.

 As to why not use `git checkout --.`... you could indeed use that to
 revert the changes, I suggested the Grunt task because it was Grunt that
 actually changed the files, so we can use Grunt again to restore these
 same files.

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


More information about the wp-trac mailing list