Commit Graph

86 Commits

Author SHA1 Message Date
Aaron Jorbin
f86fd644e1 Remove grunt-autoprefixer in favor of grunt-postcss with autoprefixer
grunt-autoprefixer was deprecated - e020f878d5
None of the autoprefixer tasks should have been called directly, so they are now removed.  `grunt precommit` and `grunt build` still work exactly as they should.  This change doesn't affect the output of our builds.

An NPM install is required after you have updated after this change.

See #31700
Props netweb



git-svn-id: https://develop.svn.wordpress.org/trunk@33129 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-08 19:53:22 +00:00
Dominik Schilling (ocean90)
c0a66eba79 Add menu management to the Customizer.
This brings in the Menu Customizer plugin: https://wordpress.org/plugins/menu-customizer/.

props celloexpressions, westonruter, valendesigns, voldemortensen, ocean90, adamsilverstein, kucrut, jorbin, designsimply, afercia, davidakennedy, obenland.
see #32576.

git-svn-id: https://develop.svn.wordpress.org/trunk@32806 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 22:07:08 +00:00
Ella Iseulde Van Dorpe
66f327cff2 QUnit: test minified files
Fixes #32574.


git-svn-id: https://develop.svn.wordpress.org/trunk@32698 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-06 19:57:54 +00:00
Scott Taylor
91143924cd Move the built media JS files up a directory to their previous location and naming convention. This fidgets with part of [31373] and will maintain BC for those who were loading those files directly (not using the enqueue system).
Props iseulde, ocean90.
Fixes #31912.


git-svn-id: https://develop.svn.wordpress.org/trunk@32125 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-14 15:30:16 +00:00
Aaron Jorbin
e2d5237851 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



git-svn-id: https://develop.svn.wordpress.org/trunk@32066 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-07 04:37:24 +00:00
Gary Pendergast
5a0564bb8f Emoji: Instead of loading the emoji JS files automatically, we now include a small JS shim in the header, to test if the user's browser needs Twemoji. It then loads the emoji JS files only if they're needed.
Props pento, azaozz.

Fixes #31701.



git-svn-id: https://develop.svn.wordpress.org/trunk@31875 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-24 23:32:23 +00:00
azaozz
e35b6490a3 Press This: exclude both bookmarklet.js and bookmarklet.min.js from the main uglify task. Props stephdau. Fixes #31657.
git-svn-id: https://develop.svn.wordpress.org/trunk@31796 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-16 20:36:02 +00:00
Andrew Ozz
71aa99360e PressThis: in Grunt, minify the bookmarklet before copying the files to /build.
See #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31774 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-13 21:08:14 +00:00
Gary Pendergast
37bee1ed3a Emoji: Instead of having custom hooks for Ajax callbacks, use MutationObserver to re-parse any changed elements in the DOM.
Props iseulde

See #31242



git-svn-id: https://develop.svn.wordpress.org/trunk@31750 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-12 12:51:06 +00:00
Scott Taylor
06a86d1425 Use browserify's watch mechanism in tandem with grunt watch. Makes building media bundles about 10 (million) times faster.
Make the `browserify` config more dynamic to make future additions easier and to ensure proper use of `SOURCE_DIR`.

Props iseulde, wonderboymusic.
See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31629 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-05 19:48:59 +00:00
Dominik Schilling (ocean90)
4e7a4deca6 Build: Let RTLCSS handle swapping the codes for right/left arrows from Dashicons.
Exclude `wp-includes/css/dashicons.css` from core task since we don't want/need a RTL version of it.

fixes #31478.

git-svn-id: https://develop.svn.wordpress.org/trunk@31579 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 20:18:05 +00:00
Dominik Schilling (ocean90)
cbb528de0f RTL CSS generation: Switch from CSSJanus to RTLCSS.
CSSJanus (introduced in [26107]), we had a great time with you, but sadly you don't like our fancy CSS.

RTLCSS is a framework for converting CSS from LTR to RTL, same as CSSJanus, with support for more CSS properties like `transform`, `transition` or multiple box and text shadows.

Changes:
* devDependencies: Remove `grunt-cssjanus`, add `grunt-rtlcss`.
* RTLCSS uses `/* rtl:ignore */` to ignore a rule, switch existing `/* @noflip */` to the new directive.
* RTLCSS supports the `transform` property, means we can remove some ignore rules.
* RTLCSS supports string maps for custom replace rules. This commit includes a rule `import-rtl-stylesheet` which replaces ".css" with "-rtl.css" in URLs.

Notes for core development:
* The file generation task is still `grunt rtl`.
* If you have used `grunt cssjanus` before, use `grunt rtlcss` now.
* Remember the new directive `/* rtl:ignore */`.

fixes #31332.

Build: https://build.trac.wordpress.org/changeset/31554

git-svn-id: https://develop.svn.wordpress.org/trunk@31573 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 13:40:03 +00:00
Andrew Ozz
b40bc85424 Press This: add press-this.css to the list of stylesheets that are minified. Bump wp_version. See #31373.
git-svn-id: https://develop.svn.wordpress.org/trunk@31547 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 23:48:27 +00:00
Andrew Ozz
2fb11a4ae4 PressThis: go back to loading the minified bookmarklet content with file_get_contents(). Add Grunt task to minify bookmarklet.js on precommit and update it in /src. See #31373.
git-svn-id: https://develop.svn.wordpress.org/trunk@31545 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 20:15:46 +00:00
Scott Taylor
a3210a100d Media JS files:
* In media manifests, ditch IIFEs and global injection, these get dynamically scoped via Browserify
* Remove the `debug` option from `browserify:media`
* Add `jshint:media` to `jshint:corejs`
* Add a trailing newline to all new module files

Props iseulde.
See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31385 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 16:00:44 +00:00
Scott Taylor
4eb88c3d15 Split the media JS files into modules:
* Add a new folder in `wp-includes/js`, `media`
* Create manifest files for `views`, `models`, `grid`, and `audio-video`
* Make `browserify` an `npm` dependency
* Add Grunt tasks for `browserify` and `uglify:media` on `build` and `watch`
* Update the paths loaded for media files in `script-loader`
* All new files were created using `svn cp` from their original location

Please run `npm install`. While developing media JS, you must run `grunt watch`.

See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31373 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 00:42:28 +00:00
boonebgorges
77aebc6d71 Use minified jquery-ui-core file during qunit:compiled Grunt task.
[30989] made jQuery UI Core a dependency for QUnit tests. This change did not
account for the fact that jQuery JS assets are minimized (and non-minimized
versions unavailable) when `grunt copy` populates the `/build` directory. To
ensure that QUnit tests pass when run during `grunt qunit:compiled`, we
manually fix the asset path to read 'core.min.js'.

See #25781.

git-svn-id: https://develop.svn.wordpress.org/trunk@31344 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 20:35:02 +00:00
Boone Gorges
df11fb8593 Exclude external-http tests when running phpunit.
The external-http tests are very slow, and `Wp_Http` functionality is fairly
isolated, so the benefits of skipping these tests by default outweigh the
risks.

A `grunt phpunit:external-http` subtask has been added, to ensure that the
tests are executed during exhaustive runs of the test suite, such as in
continuous integration.

Fixes #30304.

git-svn-id: https://develop.svn.wordpress.org/trunk@30298 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-10 14:48:28 +00:00
Aaron Jorbin
c9dfc6bebb Don't cascade autoprefixer output
Autoprefixer changed the default for cascade from false to true. Our css coding standards do not include the cascade for browser prefixes.
Introduced in r30067

see #30141



git-svn-id: https://develop.svn.wordpress.org/trunk@30069 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 20:44:33 +00:00
Aaron Jorbin
b5c0834bcb Run JSValidate on core themes JS
fixes #29968
props netweb


git-svn-id: https://develop.svn.wordpress.org/trunk@29943 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 20:37:07 +00:00
Andrew Nacin
9966625f84 Twenty Fifteen: JSHint fixes.
* Define global variables set by wp_localize_script().
 * Remove currently unused $ variable.
 * Use dot notation when appropriate.
 * Update Gruntfile.js to ignore the html5 shiv.
see #29799.


git-svn-id: https://develop.svn.wordpress.org/trunk@29893 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-14 19:47:11 +00:00
Dominik Schilling (ocean90)
539d55e068 Update jQuery UI to 1.11.1.
Because jQUI's build process no longer provides individual minified files we need some additional changes:
* Rename all files, remove the "jquery.ui." prefix. Add old files to `$_old_files`.
* Add and use non-minified files in /src.
* Add grunt task to minify jQuery UI files.
* (Non-minified files will not be shipped.)

Changelogs:
* http://jqueryui.com/changelog/1.11.0/
* http://jqueryui.com/changelog/1.11.1/

props Fab1en, ocean90.
fixes #29833.

git-svn-id: https://develop.svn.wordpress.org/trunk@29847 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-07 15:27:56 +00:00
Aaron Jorbin
811166dc1a Watch Gruntfile.js so that changes to it reload the watch task
props netweb
fixes #29068



git-svn-id: https://develop.svn.wordpress.org/trunk@29795 602fd350-edb4-49c9-b593-d223f7449a82
2014-09-29 17:20:58 +00:00
Sergey Biryukov
0c3d0214cb Gruntfile: Change import rules to include RTL stylesheets when running CSSJanus.
see #28966.

git-svn-id: https://develop.svn.wordpress.org/trunk@29256 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-21 02:50:45 +00:00
Scott Taylor
373842cdb6 Exclude jshint:plugins from both grunt precommit and grunt travis:js.
Props netweb.
Fixes #28464.


git-svn-id: https://develop.svn.wordpress.org/trunk@28873 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-28 02:08:05 +00:00
Scott Taylor
0d7450108c Use dir instead of folder in the language for jshint:plugins
Props MattyRob.
See #28464.


git-svn-id: https://develop.svn.wordpress.org/trunk@28812 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-24 00:07:00 +00:00
Scott Taylor
562d64a4a3 Improve Travis CI configuration for better performance.
Props netweb, jorbin.
Fixes #28301.


git-svn-id: https://develop.svn.wordpress.org/trunk@28799 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-21 20:05:19 +00:00
Scott Taylor
72a61e941d Add a grunt jshint:plugins task.
Props MattyRob.
Fixes #28464.


git-svn-id: https://develop.svn.wordpress.org/trunk@28798 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-21 20:02:47 +00:00
Scott Taylor
ce3248c482 Update phpunit grunt task to not use deprecated util package. Run npm install or sudo npm install to get the updates.
Props jorbin.
Fixes #27343.


git-svn-id: https://develop.svn.wordpress.org/trunk@28796 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-21 19:44:26 +00:00
Andrew Ozz
44549d4918 Fix double quote jshint warning in Gruntfile.js, fixes #26751
git-svn-id: https://develop.svn.wordpress.org/trunk@28620 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-29 19:33:00 +00:00
Andrew Nacin
6e269a7120 Append the date to $wp_version in the build output, for nightly packages.
props azaozz.
fixes #26751.


git-svn-id: https://develop.svn.wordpress.org/trunk@28611 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-29 04:32:41 +00:00
Scott Taylor
5907cafe9e More descriptive docs for grunt jshint:core.
Props netweb, jorbin.
Fixes #27567.



git-svn-id: https://develop.svn.wordpress.org/trunk@28222 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-30 21:39:43 +00:00
Andrew Ozz
8aacd10a8c Don't include the non-minified tinymce.js in /build. Load it when running from /src, else load wp-tinymce.js.gz (production) or tinymce.min.js (SCRIPT_DEBUG). Props nacin, fixes #27739
git-svn-id: https://develop.svn.wordpress.org/trunk@28081 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-11 22:16:01 +00:00
Andrew Nacin
e3171a42a3 Add PHP and JS unit tests for custom headers.
props mcsf, ehg.
see #21785.


git-svn-id: https://develop.svn.wordpress.org/trunk@27847 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-29 10:05:22 +00:00
Dominik Schilling (ocean90)
a247452cbb Widget Customizer: Move style/script registration to script loader. Update Gruntfile.js.
fixes #27356.

git-svn-id: https://develop.svn.wordpress.org/trunk@27525 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-13 19:40:15 +00:00
Helen Hou-Sandi
207da4064a Be more specific about which themes we want to jshint. props jorbin. fixes #27308.
git-svn-id: https://develop.svn.wordpress.org/trunk@27446 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 23:41:18 +00:00
Andrew Nacin
1329d5ebc0 Add jquery.masonry.min.js. fixes #25351.
git-svn-id: https://develop.svn.wordpress.org/trunk@27389 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-04 02:19:41 +00:00
Andrew Nacin
aa7a03d5ca JSHint: Generically blacklist all minified files. fixes #25351.
git-svn-id: https://develop.svn.wordpress.org/trunk@27314 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-27 19:38:51 +00:00
Andrew Nacin
0fc8021977 Developer tools: grunt-patch-wordpress from jorbin, for applying patches directly from Trac.
Mapped to `grunt patch`, which declares usage. Requires `npm install` to install.

props jorbin. props helen, evarlese for help with grammar/instructions.
see #27023.


git-svn-id: https://develop.svn.wordpress.org/trunk@27299 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-26 21:45:55 +00:00
Andrew Nacin
3abea9370b Add jshint to Travis CI config.
props jorbin.
fixes #26446.


git-svn-id: https://develop.svn.wordpress.org/trunk@27267 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-25 17:57:04 +00:00
Helen Hou-Sandi
1c5f1cebff Make login styles standalone. see #12506.
git-svn-id: https://develop.svn.wordpress.org/trunk@27199 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 03:23:49 +00:00
Helen Hou-Sandi
c4848bbac4 Once upon a time not long ago,
The admin CSS was merged in #18314.
After a couple years as it stood,
The mess it had become just was no good.
One day we realized Grunt is pretty cool,
And said "we should use this as our build tool!"
Now we can maintain separate files with ease,
Using @import and cssmin meets all our needs.
Welcome to the future of the WordPress stylesheets,
And thanks to Slick Rick for the beats.

props jorbin for the initial patch.
fixes #26669.


git-svn-id: https://develop.svn.wordpress.org/trunk@27195 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-19 21:42:36 +00:00
Andrew Nacin
f1e7635a2d Add grunt precommit for running front-end dev and test tasks before commit.
This includes autoprefixer, imagemin, jshint, and qunit.

props jorbin.
fixes #27121. see #25169 and #27078.


git-svn-id: https://develop.svn.wordpress.org/trunk@27176 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-13 17:56:29 +00:00
Andrew Nacin
562046753d Dev/build tools: Skip new backbone.js and underscore.js files during jshint.
git-svn-id: https://develop.svn.wordpress.org/trunk@27175 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-13 08:58:17 +00:00
Andrew Nacin
01b809bf2b Dev/build tools: Use grunt-autoprefixer for CSS vendor prefixes.
We'll be using it for two distinct tasks:
 * Core CSS files will keep prefixes. `grunt autoprefixer:core` will update files directly in src/ as a pre-commit step, rather than doing it on build.
 * Color CSS files will receive prefixes when they are built.

This commit:
 * Adds prefixes we were missing to core CSS.
 * Removes prefixes that we no longer need from core CSS.
 * Removes all prefixes from colors CSS.

props ocean90.
fixes #27078.


git-svn-id: https://develop.svn.wordpress.org/trunk@27174 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-13 08:29:16 +00:00
Andrew Nacin
877982732a Dev tools: Add grunt imagemin:core task for optimizing images pre-commit.
Adds grunt-contrib-imagemin, so an `npm install` will be required.

props jorbin, wonderboymusic for initial patches.
see #25169.


git-svn-id: https://develop.svn.wordpress.org/trunk@27172 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-13 08:00:47 +00:00
Andrew Nacin
4e36f55df7 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@27170 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-13 07:33:29 +00:00
Andrew Ozz
ce2dcccf86 Incorporate the TinyMCE tests into our JS tests:
- Modified the original tests so TinyMCE can be loaded from /src/wp-includes/js/tinymce.
- Added "WP" option to the UI to select only tests relevant to our integration (excludes most of the default plugins tests).
- Added tests for obsolete HTML elements and attributes (html4 back-compat).
See #27014.

git-svn-id: https://develop.svn.wordpress.org/trunk@27155 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-10 01:11:25 +00:00
Andrew Nacin
7ff0442a07 JSHint fixes for media-views and Gruntfile.
props gcorne.
fixes #27032, #27033.


git-svn-id: https://develop.svn.wordpress.org/trunk@27105 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-06 05:31:22 +00:00
Scott Taylor
1805248438 Ignore .js files in wp-content when running jsvalidate during grunt build. See [26977].
Props TobiasBg.
Fixes #26615.



git-svn-id: https://develop.svn.wordpress.org/trunk@27054 602fd350-edb4-49c9-b593-d223f7449a82
2014-01-29 04:44:31 +00:00