Commit Graph

9 Commits

Author SHA1 Message Date
Gary Pendergast
e69c1039eb Build Tools: Copy unminified JS files to src.
This allows `SCRIPT_DEBUG` to be set to `true` when running from `src`.

Fixes #45869.

Built from https://develop.svn.wordpress.org/trunk@44529


git-svn-id: http://core.svn.wordpress.org/trunk@44360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:39:50 +00:00
Gary Pendergast
922f83a69f Once upon a midnight dreary, while I coded, weak and weary,
In many a strange and curious file of forgotten lore—
While I pondered, blaming Nacin, my notifications suddenly awakened,
As of someone quietly DMing;—DMing me, I can’t ignore.
“’Tis some contributor,” I muttered, “DMing me an idea or four—
            Only this and nothing more.”

Ah, distinctly I remember, at WordCamp US, last December;
A mad proposal nearly laid me—down out cold—upon the floor.
Curious, I listened closely;—to a plan I agreed with, mostly—
A way to make our JavaScript—JavaScript which was a chore—
Maintainable, extendable, for the future, is what I saw.
            Guten-ready for evermore.

Open here I switch to Slack, when, with many a patch and hack,
In there stepped Omar, a JavaScript developer hardcore;
Pronouncing all the changes fit; ready now to be commit;
“There’s nothing else for us to do,” DMing me, “It’s done!” he swore—
“No longer random guessing at which file need next be explored—
            Let’s move on, we’re all aboard.”

Moved all together, grouped and managed, in folders all is packaged,
The code had all been cleaned and tidied, important parts moved to the fore,
“Though this change be useful here,” I said, “it is too large, I fear,
We couldn’t manage such a patch, we’ve done nothing like this before—
Tell me where doth go this change, change to make our codebase soar!”
            Quoth Omar, “In WordPress Core.”

Props omarreis for shepherding this significant change.
Props adamsilverstein, aduth, atimmer, dingo_bastard, frank-klein, gziolo, herregroen, jaswrks, jeremyfelt, jipmoors, jorbin, netweb, ocean90, pento, tjnowell, and youknowriad for testing, feedback, discussion, encouragement, commiserations, etc.
I make no apologies for this commit message.
Fixes #43055.


Built from https://develop.svn.wordpress.org/trunk@43309


git-svn-id: http://core.svn.wordpress.org/trunk@43138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-23 10:05:31 +00:00
Dominik Schilling
4693b25171 Update Backbone and Underscore to the latest versions.
Backbone, from 1.1.2 to 1.2.3. Underscore, from 1.6.0 to 1.8.3.

The new versions of Backbone and Underscore offer numerous small bug fixes and some optimizations and other improvements. Check the [http://backbonejs.org/#changelog Backbone changelog] and [http://underscorejs.org/#changelog Underscore changelog] for the full details. 

The new versions include some significant changes that may break existing code. Plugins or themes that rely on the bundled Backbone and/or Underscore libraries should carefully check functionality with the latest versions and run any available unit tests to ensure compatibility.

Some changes of note that were addressed in core as part of this upgrade:

* `_.flatten` no longer works with objects since Underscore.js 1.7. `_.flatten()` working with objects was an unintended side-affect of the implementation, see [https://github.com/jashkenas/underscore/issues/1904#issuecomment-60241576 underscore#1904]. Check any `_flatten` usage and only flatten arrays.
* As of Backbone 1.2.0, you can no longer modify the `events` hash or your view's `el` property in `initialize`, so don't try to modify them there. 
* Since Underscore 1.7, Underscore templates no longer accept an initial data object. `_.template` always returns a function now so make sure you use it that way.

Props adamsilverstein.
Fixes #34350.
Built from https://develop.svn.wordpress.org/trunk@36546


git-svn-id: http://core.svn.wordpress.org/trunk@36513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 15:22:26 +00:00
Aaron Jorbin
cc7f70c15e Don't override minified libraries included in core
A number of libraries that we include in core come with minified versions that we also include in core. The build process shouldn't override them.

Fixes #31477
Props ocean90, jorbin


Built from https://develop.svn.wordpress.org/trunk@32066


git-svn-id: http://core.svn.wordpress.org/trunk@32045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-07 04:38:25 +00:00
Andrew Nacin
07adb0640f Update Backbone from 1.0 to 1.1.
Also update Underscore to 1.6. Includes the development versions of both, which are not included in the build.

Here is Backbone's changelog:
 * Made the return values of Collection’s `set`, `add`, `remove`, and `reset` more useful. Instead of returning `this`, they now return the changed (added, removed or updated) model or list of 
models. (This means they can no longer be chained.)
 * Backbone Views no longer automatically attach options passed to the constructor as `this.options` and Backbone Models no longer attach `url` and `urlRoot` options, but you can do it yourself if you prefer. (But if you extend `wp.Backbone.View`, options will be attached for you.)
 * All `"invalid"` events now pass consistent arguments. First the model in question, then the error object, then options.
 * You are no longer permitted to change the id of your model during `parse`. Use `idAttribute` instead.
 * On the other hand, `parse` is now an excellent place to extract and vivify incoming nested JSON into associated submodels.

See [27171] (next commit) for changes made to WordPress to be compatible with Backbone 1.1.

props gcorne, georgestephanis.
see #26799.

Built from https://develop.svn.wordpress.org/trunk@27170


git-svn-id: http://core.svn.wordpress.org/trunk@27035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-13 07:34:13 +00:00
Mark Jaquith
fe2dd7a2a3 Update Underscore to version 1.4.4. see #23262
git-svn-id: http://core.svn.wordpress.org/trunk@23383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-04 06:40:21 +00:00
Daryl Koopersmith
6353c72bb8 Update underscore.js to version 1.4.1. fixes #22081, see #22026.
git-svn-id: http://core.svn.wordpress.org/trunk@22100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-03 00:27:16 +00:00
Daryl Koopersmith
dbbcf97f86 Update underscore.js to version 1.4.0. fixes #22026.
git-svn-id: http://core.svn.wordpress.org/trunk@22076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-27 23:38:47 +00:00
Daryl Koopersmith
5bf22749a3 Please welcome Underscore.js and Backbone.js to core. fixes #21664.
git-svn-id: http://core.svn.wordpress.org/trunk@21591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-22 22:24:20 +00:00