[wp-trac] [WordPress Trac] #43055: Reorganize Core JS / introduce build step
WordPress Trac
noreply at wordpress.org
Tue Feb 13 15:37:30 UTC 2018
#43055: Reorganize Core JS / introduce build step
------------------------------+-------------------------
Reporter: omarreiss | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 5.0
Component: Build/Test Tools | Version: trunk
Severity: normal | Resolution:
Keywords: dev-feedback | Focuses: javascript
------------------------------+-------------------------
Comment (by omarreiss):
Uploaded a new patch with the following fixes:
- `grunt watch` now under 1 second thanks to work done by @herregroen. CC:
@adamsilverstein
- `jQuery.noConflict()` is appended to jquery.js using a `file_append`
task. CC: @jaswrks
- `grunt qunit` now passes again. I've decided to run the JS from the
build directory since most of those tests are integration tests anyway.
CC: @jorbin @adamsilverstein
- Hardcoded version numbers for `dependencies` in `package.json`. CC:
@jaswrks @netweb
- Updated jquery-hoverintent to 1.8.3 to fix inconsistencies.
Todo (mostly documentation):
- I will create core handbook drafts to document the JS contribution
process better and include philosophy points. I would like to add a
`src/js/README.md` that references those handbook pages.
- @jorbin gave feedback on the file mapping PR: https://github.com/Yoast
/grunt-patch-wordpress/pull/1. File mapping config should be added to the
project itself. I still need to do this.
@adamsilverstein With regard to introducing an extra directory. The idea
is that the source lives under `src/js`. We've discussed putting the
modular source code in `src/js/src` but this felt confusing to most of us.
I did add an `_enqueues` directory to separate unbundled modules from
scripts that are loaded.
With regard to development platforms like VVV, I'd prefer those to run
`grunt watch` internally, so a user who runs `vagrant up` can just edit
the source and everything gets built automatically. If that is the case,
it really doesn't matter anymore if we require WordPress to be run from
build, since anyone using a dev platform will not be concerned with that.
@pento what do you consider to be the next steps after this?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43055#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list