Commit Graph

113 Commits

Author SHA1 Message Date
Ella Iseulde Van Dorpe f261cb7914 Build/Test Tools: Run image tasks only if there are changes
See #36528.


git-svn-id: https://develop.svn.wordpress.org/trunk@37211 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-15 10:18:03 +00:00
Sergey Biryukov 1694407e0d Build Tools: Don't run the `build` task twice in `grunt prerelease` (it already runs via the `precommit:js` task).
Props netweb.
Fixes #36489.

git-svn-id: https://develop.svn.wordpress.org/trunk@37206 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-14 15:38:40 +00:00
Ella Iseulde Van Dorpe f0bc007421 Build/Test Tools: Better git/svn detection
Prevent tasks from running twice in parallel 
if both .svn and .git directories are present.

Add `--ignore-externals` to `svn status`
and replace `git diff --name-only` with `git status --short`.

Merge some duplicate code.

Fixes #36394.
See #35557.
See [36906].



git-svn-id: https://develop.svn.wordpress.org/trunk@37185 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-12 22:33:18 +00:00
ocean90 72f82072d4 Build Tools: Rename the `precommit:core` task to `precommit:base` for clarification.
`precommit:base` runs only the `imagemin:core` task.

Fixes #35557.

git-svn-id: https://develop.svn.wordpress.org/trunk@36955 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-10 20:13:29 +00:00
Dominik Schilling (ocean90) 307f8d8558 Build Tools: Update grunt-rtlcss ~1.6.0 → ~2.0.1.
This updates the underlying RTLCSS framework to 2.0 which provides new options and config settings, see https://github.com/MohammadYounes/rtlcss/blob/master/CHANGELOG.md#200---18-feb-2016.

See #35104.

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

git-svn-id: https://develop.svn.wordpress.org/trunk@36935 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-10 16:00:11 +00:00
Aaron Jorbin 6abfb7a92a Add grunt prerelease task
An unintended consequence of improving the precommit task is that when it's time to run a release, more tasks need to get run to verify things. This adds a prerelease task to help fix that situation. grunt prerelease should include tasks that verify the code base is ready to be released to the wild and find all the tears on the mausoleum floor and help Blood stain the Colosseum doors.

See #35557


git-svn-id: https://develop.svn.wordpress.org/trunk@36930 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-10 05:36:15 +00:00
Boone Gorges 47dd0e3471 Increase beautificatedness of language in `grunt precommit` unit test messages.
Comma splices are bad, we should remove them from the codebase.

See #35557.

git-svn-id: https://develop.svn.wordpress.org/trunk@36924 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-10 03:01:06 +00:00
Aaron Jorbin 81652abd8b Improve grunt precommit task
Instead of running all tasks, all the time, let's run tasks based on the files changed. PHPUNIT is now a precommit task for all php file changes. 

This adds a new dependency. Please run `npm install`.

Fixes #35557
Props  ericlewis, netweb, jorbin



git-svn-id: https://develop.svn.wordpress.org/trunk@36906 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-09 20:54:10 +00:00
Dominik Schilling (ocean90) 5f808bd8fc Media: Add support for minified versions of wp-playlist.js, wp-mediaelement.js and wp-mediaelement.css.
Fixes #35984.

git-svn-id: https://develop.svn.wordpress.org/trunk@36780 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-29 20:42:10 +00:00
Dion Hulse 078b93863d Build Tools: Revert to using a human readable timestamp rather than the unix timestamp in [36315].
Fixes #28722


git-svn-id: https://develop.svn.wordpress.org/trunk@36351 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 02:01:57 +00:00
Dion Hulse 834ba4367f CSS: Stop using `wp-admin.min.css` and instead queue the individual stylesheets up through `load-styles.php`.
We still generate the `wp-admin.*` files for compabitility purposes, however they only include the `@import()` lines.

Fixes #35229


git-svn-id: https://develop.svn.wordpress.org/trunk@36341 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-18 09:56:06 +00:00
Pascal Birchler 8e8cdb2ef4 Build Tools: Append the timestamp to `$wp_version` instead of only the current date.
This ensures the `Etag` header added in [36312] changes for every build.

Fixes #28722.

git-svn-id: https://develop.svn.wordpress.org/trunk@36315 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-15 11:53:29 +00:00
Dominik Schilling (ocean90) ee3ac55419 Build: Update source for `includes:embed` after [35718].
See #33413.

git-svn-id: https://develop.svn.wordpress.org/trunk@35720 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-20 15:36:21 +00:00
Gary Pendergast c7e05dafbe Embeds: Remove `&` characters from the inline embed JS.
Older versions of WordPress will convert those `&` characters to `&`, which makes for some non-functional JS. If folks are running an older release, let's not make their lives more difficult than it already is.

Props pento, peterwilsoncc.

See #34698.



git-svn-id: https://develop.svn.wordpress.org/trunk@35708 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-19 23:05:39 +00:00
Aaron Jorbin 76da6cf987 Set cssmin compatibility to ie7
This matches the autoprefixer setting. This changes all compiled CSS.

Fixes #34540.
Props christophherr, peterwilsoncc, netweb



git-svn-id: https://develop.svn.wordpress.org/trunk@35684 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 20:27:45 +00:00
Dominik Schilling (ocean90) ca3e473b47 Build Tools: Update the `preserveComments` option for `uglify:jqueryui`.
Uglify2 doesn't support the value "some" anymore. Replace it with the `/^!/` regex which produces the same output as before.

See https://build.trac.wordpress.org/changeset/35502 and https://build.trac.wordpress.org/changeset/35528.
Fixes #34177.

git-svn-id: https://develop.svn.wordpress.org/trunk@35564 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-07 12:36:24 +00:00
Sergey Biryukov 88d63f743e Build Tools: Add Microsoft Edge to Autoprefixer options.
Props christophherr.
Fixes #34550.

git-svn-id: https://develop.svn.wordpress.org/trunk@35488 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-02 20:43:55 +00:00
Gary Pendergast 47e6c78d88 Embeds: Add fallbacks for IE7-9.
Older IE versions need just that little bit of extra tender care to keep them going.

Props peterwilsoncc, swissspidy, pento.

Fixes #34204.



git-svn-id: https://develop.svn.wordpress.org/trunk@35466 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-31 04:37:41 +00:00
Aaron Jorbin 8f2e001efe Replace Autoprefixer Core with Autoprefixer
Autoprefixer Core 5.2.1 -> Autoprefixer 6.0.3 https://github.com/postcss/autoprefixer/releases/tag/6.0.0
Package autoprefixer-core is deprecated in favour of autoprefixer as part of the 6.0.0 release:
Packages autoprefixer and autoprefixer-core were merged in 6.0 release.
Autoprefixer 6.0.0 requires PostCSS 5.0.10 or greater
PostCSS 0.5.4 -> 0.6.0 https://github.com/nDmitry/grunt-postcss/compare/v0.5.4...v0.6.0

You will need to update your dev dependencies after this change.

Props netweb
See #34177



git-svn-id: https://develop.svn.wordpress.org/trunk@35332 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-21 16:47:21 +00:00
Sergey Biryukov 9b591d6b09 Embeds: Rename files, functions, and hooks added in [34903] to make it more clear what is oEmbed-specific and what isn't.
See https://core.trac.wordpress.org/ticket/34272#comment:7 for full list of renamed functions and hooks.

Props swissspidy.
Fixes #34272.

git-svn-id: https://develop.svn.wordpress.org/trunk@35235 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-17 01:20:19 +00:00
Sergey Biryukov 5b6257083d Twenty Sixteen: Update `Gruntfile.js` to ignore the html5 shiv for JSHint.
See #34306, #34315.

git-svn-id: https://develop.svn.wordpress.org/trunk@35203 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-15 17:26:44 +00:00
Gary Pendergast 46fbcc96fd Build: Fix a filename typo in [34903].
Props peterwilsoncc.

See #32522.



git-svn-id: https://develop.svn.wordpress.org/trunk@34906 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 12:04:39 +00:00
Gary Pendergast 43bd3d46c9 Embeds: Add oEmbed provider support.
For the past 6 years, WordPress has operated as an oEmbed consumer, allowing users to easily embed content from other sites. By adding oEmbed provider support, this allows any oEmbed consumer to embed posts from WordPress sites.

In addition to creating an oEmbed provider, WordPress' oEmbed consumer code has been enhanced to work with any site that provides oEmbed data (as long as it matches some strict security rules), and provides a preview from within the post editor.

For security, embeds appear within a sandboxed iframe - the iframe content is a template that can be styled or replaced entirely by the theme on the provider site.

Props swissspidy, pento, melchoyce, netweb, pfefferle, johnbillion, extendwings, davidbinda, danielbachhuber, SergeyBiryukov, afercia

Fixes #32522.



git-svn-id: https://develop.svn.wordpress.org/trunk@34903 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 10:35:18 +00:00
Scott Taylor bec5838166 Build Tools: upgrade `grunt-browserify` to `~4.0.0` and remove the `watch` task for `browserify`, which has its own internal watcher. Run `npm install` to update.
Props iseulde.
Fixes #31911.


git-svn-id: https://develop.svn.wordpress.org/trunk@34888 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 00:00:00 +00:00
Scott Taylor 16312b141b Speed up `browserify` builds, don't `uglify` the media builds on `watch`.
Props iseulde.
Fixes #31911.


git-svn-id: https://develop.svn.wordpress.org/trunk@33960 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 02:11:23 +00:00
Scott Taylor 220ba402e5 Pre-req for Media builds: make sure the watcher actually works for `browserify`.
See #31911.


git-svn-id: https://develop.svn.wordpress.org/trunk@33959 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 02:02:14 +00:00
Ella Iseulde Van Dorpe 129a3affe5 Editor: word count: exclude more characters
Also only exclude these characters for the `words` type. They should be counted for other types.
Add the ASCIIOnly option to the uglify config to preserve escaped unicode characters.

See #30966. Fixes #27391.



git-svn-id: https://develop.svn.wordpress.org/trunk@33292 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-16 09:44:43 +00:00
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