Commit Graph

205 Commits

Author SHA1 Message Date
TimothyBlynJacobs 1856d0fe2a REST API: Introduce Application Passwords for API authentication.
In WordPress 4.4 the REST API was first introduced. A few releases later in WordPress 4.7, the Content API endpoints were added, paving the way for Gutenberg and countless in-site experiences. In the intervening years, numerous plugins have built on top of the REST API. Many developers shared a common frustration, the lack of external authentication to the REST API.

This commit introduces Application Passwords to allow users to connect to external applications to their WordPress website. Users can generate individual passwords for each application, allowing for easy revocation and activity monitoring. An authorization flow is introduced to make the connection flow simple for users and application developers.

Application Passwords uses Basic Authentication, and by default is only available over an SSL connection.

Props georgestephanis, kasparsd, timothyblynjacobs, afercia, akkspro, andraganescu, arippberger, aristath, austyfrosty, ayesh, batmoo, bradyvercher, brianhenryie, helen, ipstenu, jeffmatson, jeffpaul, joostdevalk, joshlevinson, kadamwhite, kjbenk, koke, michael-arestad, Otto42, pekz0r, salzano, spacedmonkey, valendesigns.
Fixes #42790.


git-svn-id: https://develop.svn.wordpress.org/trunk@49109 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-08 22:12:02 +00:00
Andrew Ozz 9c50d3dda5 Update jQuery step two:
- Add jquery-migrate.js v.3.3.1 to core and load it in debug mode when `SCRIPT_DEBUG` is true.
- Add jquery.min.js, update jquery.js to 3.5.1 non-minified. This should help when debugging.
- Rebuild jQuery UI 1.12.1 and add it to core.
- Fix/adjust tests to match the above changes.

See #50564.

git-svn-id: https://develop.svn.wordpress.org/trunk@49101 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-07 16:31:53 +00:00
Sergey Biryukov 44def76306 Build/Test Tools: Replace the banner text from `wp-emoji-loader.min.js` in `formatting.php` during build process.
This ensures that `/*! This file is auto-generated */` comment is not included on front end as part of the inline Emoji detection script.

Follow-up to [41271], [46589].

Props superpoincare, SergeyBiryukov.
Fixes #49861.

git-svn-id: https://develop.svn.wordpress.org/trunk@48096 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-19 22:06:28 +00:00
Sergey Biryukov fbb42b017b External Libraries: Update Moment.js to 2.26.0.
Changelog: https://github.com/moment/moment/compare/2.22.2...2.26.0

This commit also fixes a deprecation warning regarding the usage of `moment.locale()` to set locale properties.

As of Moment.js 2.12.0, `moment.locale()` is deprecated and `moment.updateLocale()` should be used instead.

Additionally, minimize `moment.js` as part of build process to remove the source map reference.

This avoids a `sourceMappingURL` being in the minified file, as we don't ship source maps.

Props yoancutillas, SergeyBiryukov.
Fixes #50408.

git-svn-id: https://develop.svn.wordpress.org/trunk@48075 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-17 17:38:40 +00:00
Dominik Schilling 3d31284c5e Administration: Remove any CSS related to Internet Explorer versions 6 – 10.
In WordPress 3.2 support for IE6 was dropped, IE7 followed a few versions later. With the 4.8 release, WordPress officially ended support for Internet Explorer versions 8, 9, and 10. Yet, we still have shipped CSS for the unsupported IE versions....until now! Goodbye to ie.css and star hacks!

* Removes ie.css and `ie` style handle.
* Removes IE specific class names and any related CSS.
* Drops support for IE8 and older in `wp_customize_support_script()`.
* Updates compatibility mode for CSS minification to `ie11`.

Props ayeshrajans, isabel_brison, afercia, netweb, peterwilsoncc, ocean90.
Fixes #17232, #46015.

git-svn-id: https://develop.svn.wordpress.org/trunk@47771 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-06 20:13:38 +00:00
Andrew Ozz 41027e3f8e Build/Test Tools: Introduce Install-changed. It keeps a hash of `package.json` and compares it when run. If it has any changes, it runs `npm install`.
This keeps `node_modules` always updated and is useful not only when the packages have been updated, but also when the working copy has been "reverted" to an earlier revision.

Fixes #49594.

git-svn-id: https://develop.svn.wordpress.org/trunk@47497 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-24 01:04:43 +00:00
Andrew Ozz baa9b2d1f0 Build Tools: Use the new `combinedOutputFile` setting for the updated DependencyExtractionWebpackPlugin and output `script-loader-packages.php` directly in `wp-includes/assets/`.
Props gziolo, azaozz.
See: #48154.

git-svn-id: https://develop.svn.wordpress.org/trunk@47471 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-18 04:48:19 +00:00
Andrew Ozz aca1a8aa3d Build Tools: Exclude the `src/wp-includes/assets/` directory from copying when building. Its content is generated by Webpack and copied in another task.
See #48154.

git-svn-id: https://develop.svn.wordpress.org/trunk@47407 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-02 19:08:48 +00:00
Andrew Ozz 3a4faa975f Build Tools: Do not delete the (now committed) `script-loader-packages.php` file when running `clean:js` and copy it to /build. Fixes cases when running `grunt watch` or `-dev` where that file may be deleted and not recreated.
See #48154.

git-svn-id: https://develop.svn.wordpress.org/trunk@47380 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-26 05:13:05 +00:00
Andrew Ozz b2d243fbe6 Build Tools:
- Update the DependencyExtractionWebpackPlugin to 2.3.0 and set it to output a single assets file.
- Grunt: copy the assets file to both `SOURCE_DIR` and `BUILD_DIR` as `wp-includes/assets/script-loader-packages.php`.
- "Unignore" the `wp-includes/assets` directory. Its content will be committed similarly to `wp-includes/blocks`.
- Update `wp_default_packages_scripts()` to use the above file. This also removes the hard-coded lists of packages and packages with translations.

Props gziolo, pbearne, johnbillion, isabel_brison, ocean90, azaozz.
Fixes #48154.

git-svn-id: https://develop.svn.wordpress.org/trunk@47352 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-24 21:20:49 +00:00
Sergey Biryukov dd859e48f2 Built/Test Tools: Ignore the `node_modules` folder in Twenty Nineteen when running `grunt jshint:themes`.
Follow-up to [45060], [46352], [46450].

Fixes #49494. See #46706.

git-svn-id: https://develop.svn.wordpress.org/trunk@47348 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-23 08:26:15 +00:00
Sergey Biryukov efde364e7c Build/Test Tools: Keep `wp-config.php` file in the `build` directory on rebuild, but still copy it over from `src` if it also exists there.
Follow-up to [47303].

Props afercia, isabel_brison, SergeyBiryukov.
Fixes #49460.

git-svn-id: https://develop.svn.wordpress.org/trunk@47312 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-19 01:48:15 +00:00
Sergey Biryukov 82ddcbf707 Build/Test Tools: Keep `wp-config.php` file in the `build` directory on rebuild.
Props isabel_brison.
Fixes #49460.

git-svn-id: https://develop.svn.wordpress.org/trunk@47303 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-18 09:25:25 +00:00
Sergey Biryukov cfc3b57488 Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@47122 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-29 00:43:23 +00:00
Grzegorz (Greg) Ziółkowski a35e46a937 Build Tools: Integrate DependencyExtractionWebpackPlugin in the JS build.
This patch integrates DependencyExtractionWebpackPlugin which was battle-tested in Gutenberg. 

This will greatly simplify the process of upgrading npm packages which change after every Gutenberg release. It might even useful during the WordPress release cycle as we might need to publish more often as we discover critical bugs and regressions.

Props jonsurrell, adamsilverstein, youknowriad, ocean90, netweb.

Fixes #48154. 



git-svn-id: https://develop.svn.wordpress.org/trunk@47035 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-03 13:15:33 +00:00
Andrew Ozz 2133f8392e Fix the admin toolbar js when jQuery is not present and replace the jQuery based hoverIntent.js with a native implementation. Introduces the "hoverintent" (no dependencies) package.
Props dinhtungdu, audrasjb, azaozz.
Fixes #47069.

git-svn-id: https://develop.svn.wordpress.org/trunk@46872 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-10 01:01:35 +00:00
Jonathan Desrosiers 9d88dbac58 External Libraries: Revert [46634-46635].
On further investigation, Plupload changed it’s license to a non-GPL compatible license. The newest, GPL compatible version is being used already in Core.

Unprops desrosj.
See #48277.

git-svn-id: https://develop.svn.wordpress.org/trunk@46638 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 17:07:42 +00:00
Jonathan Desrosiers 669e701a5b External Libraries: Update Plupload from 2.1.9 to 2.3.6.
This change also updates the MoxieJS dependency from 1.3.5 to 1.5.7, converts Plupload to a dependency in NPM, and integrates all relevant parts into the build process.

For a full list of upstream changes, see https://github.com/moxiecode/plupload/compare/v2.1.9...v2.3.6.

Props desrosj, hareesh-pillai.
Fixes #48277.

git-svn-id: https://develop.svn.wordpress.org/trunk@46634 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 15:29:46 +00:00
Sergey Biryukov 354fc5cba0 Build/Test Tools: Add banner to RTL CSS and minified JS files.
Patches occasionally come in on generated files. We should be kind to new contributors and give them a hint that these files are auto-generated.

This is a follow-up to [41271], which added the banner to minified CSS files.

Fixes #48424. See #30666.

git-svn-id: https://develop.svn.wordpress.org/trunk@46589 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-26 00:15:53 +00:00
Aaron Jorbin 2c5032e29d Build/Test: Update Grunt Uglify options
Follow up to [46408]

Sometimes you need to take documentation literally. And sometimes you need to take it seriously. Deprecations and replacements in uglify are a case where I took them literally and should have taken them seriously.

See #48203.



git-svn-id: https://develop.svn.wordpress.org/trunk@46409 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-05 21:59:32 +00:00
Aaron Jorbin 3f9927d3ab Build/Test: Bump devDependencies for WordPress 5.3
This upgrades a number of devDependencies.  Some of these include changes to how the tasks are configured.

Uglify: There are deprecated options from 2.x to 4.x, see: https://github.com/gruntjs/grunt-contrib-uglify#options

Autoprefixer: Browserslist now warns when passing in the browser list, so that is put into package.json

As with most changes to uglify, this changes every minified JS file.

Fixes #48203.




git-svn-id: https://develop.svn.wordpress.org/trunk@46408 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-05 19:47:04 +00:00
Jonathan Desrosiers e9e1c4c30d Built/Test Tools: Ignore the `node_modules` folder in Twenty Twenty.
Ignore the `node_modules` folder in Twenty Twenty in SVN, and when running `grunt build` or `grunt jshint:themes`.

See #48110.

git-svn-id: https://develop.svn.wordpress.org/trunk@46352 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-30 15:57:21 +00:00
Jake Spurlock 8029e23ffe Accessibility: Replace wp-a11y.js with @wordpress/a11y package
We've extracted wp-includes/wp-a11y.js to a reusable package wordpress/a11y which is published on NPM. Let's make sure this package is also used in WordPress core. Once all the JavaScript is built using webpack, we can also import this package wherever it is used and configure webpack to load is an external.

Props omarreiss, herregroen, desrosj, ocean90, afercia, sstoqnov



git-svn-id: https://develop.svn.wordpress.org/trunk@46167 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-18 17:40:35 +00:00
Gary Pendergast c645936163 Emoji: Upgrade Twemoji to 12.1.2.
This upgrade adds support for the transgender flag: 🏳️‍⚧️

There's some additional housekeeping in this commit:

- Twemoji recently rearranged their repository and package, so `Gruntfile.js` needed tweaking to allow for that.
- As only new files were added in this Twemoji release, the CDN version didn't need updating.

Fixes #47852.



git-svn-id: https://develop.svn.wordpress.org/trunk@45769 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-08 04:04:15 +00:00
Gary Pendergast 3d1714de71 Coding Standards: Move the remaining PHPCS errors to report as warnings, and add Travis tests.
The remaining error-level coding standards issues (specifically, associated with the sniffs `WordPress.PHP.YodaConditions.NotYoda`, `WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase`, `WordPress.DB.PreparedSQL.InterpolatedNotPrepared`, `WordPress.DB.PreparedSQL.NotPrepared`, and `WordPress.Files.FileName.InvalidClassFileName`) are marked as warnings, until they're all addressed.

This change allows us to run linting on Travis across the entire codebase, ensuring no other error-level violations can be introduced.

Additionally, PHPCS will now cache results locally, drastically improving performance for subsequent checks: scanning the entire codebase takes 1-2 minutes the first time, and less than one second for subsequent checks.

See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45665 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-19 07:47:16 +00:00
Gary Pendergast c6c78490e2 Coding Standards: Fix the remaining issues in `/tests`.
All PHP files in `/tests` now conform to the PHP coding standards, or have exceptions appropriately marked.

Travis now also runs `phpcs` on the `/tests` directory, any future changes to these files must conform entirely to the WordPress PHP coding standards. 🎉

See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45607 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-08 00:55:20 +00:00
Andrew Ozz 9fcb362fa0 Privacy tools: Organize privacy functions into logical files and classes.
Props xkon, birgire, desrosj, garrett-eclipse, azaozz.
See #43895.

git-svn-id: https://develop.svn.wordpress.org/trunk@45448 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 20:49:04 +00:00
Andrew Ozz 14066540c0 jQuery: bring jquery.js back into the WordPress SVN repo and backport the patch from 3.4.0.
Props MikeNGarrett, peterwilsoncc, azaozz.
Fixes #47020 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@45342 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-17 04:24:44 +00:00
Andrew Ozz d2e3a1f1a0 Build tools: fix generating `*-rtl.css` files in `wp-includes/css` after `grunt --dev` was used.
Fixes #47078.

git-svn-id: https://develop.svn.wordpress.org/trunk@45317 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-16 02:24:58 +00:00
Sergey Biryukov de91abb11f Build/Test Tools: Exclude `twentynineteen/node_modules` from `jsvalidate:build` task.
Fixes #46706.

git-svn-id: https://develop.svn.wordpress.org/trunk@45060 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-28 21:16:48 +00:00
Gary Pendergast 1ab6f67ef5 Site Health: Improve the "Copy to clipboard" button.
The previous method for copying the debug report to the clipboard involved having a hidden `<textarea>`, but this shows up in screen readers and can't be reliably hidden.

To work around this, the button now uses the `clipboard.js` library, which automatically handles browser differences in the Clipboard API, and can load the text to copy from a `data-` attribute on the button.

Props pento, hedgefield, afercia.
Fixes #46647.



git-svn-id: https://develop.svn.wordpress.org/trunk@45044 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 22:30:26 +00:00
Gary Pendergast dad6b61cfb Admin: Introduce the Site Health screens.
The Site Health tool serves two purposes:
- Provide site owners with information to improve the performance, reliability, and security of their site.
- Collect comprehensive debug information about the site.

By encouraging site owners to maintain their site and adhere to modern best practices, we ultimately improve the software hygeine of both the WordPress ecosystem, and the open internet as a whole.

Props Clorith, hedgefield, melchoyce, xkon, karmatosed, jordesign, earnjam, ianbelanger, wpscholar, desrosj, pedromendonca, peterbooker, jcastaneda, garyj, soean, pento, timothyblynjacobs, zodiac1978, dgroddick, garrett-eclipse, netweb, tobifjellner, pixolin, afercia, joedolson, birgire.
See #46573.


git-svn-id: https://develop.svn.wordpress.org/trunk@44986 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-23 03:54:16 +00:00
Peter Wilson 3ec3100195 Build: Remove source map from `jquery.form.min.js`.
Minimize jquery.form.js as part of build process to remove the source map reference. 

Modify source map tests to include all JavaScript files rather than testing Backbone and jQuery only.

Props pento.
Fixes #46218.



git-svn-id: https://develop.svn.wordpress.org/trunk@44740 602fd350-edb4-49c9-b593-d223f7449a82
2019-02-14 00:06:39 +00:00
Andrew Ozz 21e479d3a8 TinyMCE: retire wp-tinymce.php and remove pre-compression of wp-tinymce.js.
Fixes #45645.

git-svn-id: https://develop.svn.wordpress.org/trunk@44651 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-18 19:50:19 +00:00
Gary Pendergast 37dd83ab7e Build Tools: Uglify `underscore.min.js` while building.
This avoids a `sourceMappingURL` being in the minified file, as we don't ship source maps.

Props pento, laghee.
Fixes #44560.



git-svn-id: https://develop.svn.wordpress.org/trunk@44632 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-17 04:23:38 +00:00
Gary Pendergast 3e5aa4d4a5 Build Tools: Copy unminified JS files to `src`.
This allows `SCRIPT_DEBUG` to be set to `true` when running from `src`.

Fixes #45869.


git-svn-id: https://develop.svn.wordpress.org/trunk@44529 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 01:38:22 +00:00
Anton Timmermans 5faccb9683 Build tools: Fix the `travis:js` build.
After [44359] it is impossible to not use ES6 syntax for some logic in the `Gruntfile.js`, so adjust the `esversion` setting for the `Gruntfile.js` to 6. Because the previous setting in `.jshintrc` was not compatible with setting `esversion`, set the `esversion` in the `.jshintrc` explicitly.

See #44492.


git-svn-id: https://develop.svn.wordpress.org/trunk@44361 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-24 13:53:11 +00:00
Anton Timmermans 68dd26a4c0 Build tools: Fix the `grunt format:php` build.
Re-add variable that was removed on accident by [44359]. Also run `grunt format:php` to adjust the code style.
.--This line, and those below, will be ignored--

M    Gruntfile.js
M    src/index.php
M    src/wp-admin/index.php
M    src/wp-includes/class-wp-block-parser.php


git-svn-id: https://develop.svn.wordpress.org/trunk@44360 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-24 13:44:05 +00:00
Anton Timmermans d2d7243e80 Build tools: Allow building WordPress to `src`.
After the JavaScript reorganization in [43309], it was no longer possible to test WordPress from the `src` folder. That meant a build step was required to test PHP modifications. That is suboptimal as even a simple copy is slower than a web server just serving the new file.

We achieve building to `src` by setting a `WORKING_DIR` constant in the Gruntfile that is `build` by default, but changes to `src` when the `--dev` flag is present on any Grunt command. We provide sensible defaults so some commands, such as copying `version.php`, always build to `build`.

Because testing from `build` is no longer required, we change the messages present in `index.php` and `wp-admin/index.php` to be more broadly about building WordPress.

We also change the webpack config to have more straightforward behavior based on the `buildTarget` argument. It only determines the build target now and has no implicit behavior anymore. `grunt build` still works as it worked before, to make sure that the build server produces the same `wordpress.zip` we are used to.

We do all this instead of a symlink setup because symlinks don't work on every platform.

Props omarreiss, netweb, flixos90, SergeyBiryukov.
Fixes #44492.


git-svn-id: https://develop.svn.wordpress.org/trunk@44359 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-24 13:28:22 +00:00
Jonathan Desrosiers 30dcae9e2d External Libraries: zxcvbn library.
This reverts [44354] for more investigation into inconsistent password strength values that passed locally prior to commit.

Unprops omarreiss, netweb, desrosj.
See #43749.

git-svn-id: https://develop.svn.wordpress.org/trunk@44356 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-20 21:02:16 +00:00
Jonathan Desrosiers 691f79b76b External Libraries: Update zxcvbn to 4.2.2.
Version 4.2.2 of the zxcvbn password strength library has several bug fixes. A full list of changes can be seen here: https://github.com/dropbox/zxcvbn/compare/v4.4.1...v4.4.2.

This commit also adds the library as a project dependency, making it easier to update in the future. Because the dictionary within the library contains non-PG language, a `rot13:zxcvbn` task has been added to Grunt to perform a ROT-13 cipher on the library. This task has been added to `grunt build` and `grunt build:js`.

Props omarreiss, netweb, desrosj.
Fixes #43749.

git-svn-id: https://develop.svn.wordpress.org/trunk@44354 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-20 19:45:15 +00:00
Sergey Biryukov 62a5cd343c Build Tools: Don't include `.map` files in the build.
These files are fairly large, and while they're useful in development, they're not needed in the final build.

Props pento, mcsf.
Merges [43931] and [43932] to trunk.
See #45201.

git-svn-id: https://develop.svn.wordpress.org/trunk@44282 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-18 03:13:58 +00:00
Sergey Biryukov 2b8464c5e5 Build Tools: Minify the package CSS when building.
CSS coming from the `@wordpress` packages wasn't being minified in the build. This had the noteable side effect of causing RTL CSS to not be loaded when `SCRIPT_DEBUG` was set to `false`.

Props websupporter.
Merges [43905] to trunk.
Fixes #45330.

git-svn-id: https://develop.svn.wordpress.org/trunk@44252 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 00:36:36 +00:00
Sergey Biryukov 376d146378 Build Tools: Revert unrelated changes to `Gruntfile.js` added in [44245].
See #45156.

git-svn-id: https://develop.svn.wordpress.org/trunk@44246 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 23:33:38 +00:00
Sergey Biryukov caca9cb77b Build Tools: Add non-minified `@wordpress` scripts to the build output.
Props atimmer.
Merges [43886] to trunk.
See #45156.

git-svn-id: https://develop.svn.wordpress.org/trunk@44245 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 23:27:36 +00:00
Jeremy Felt c52b38b844 Build Tools: Update `grunt-sass` to v3 and add `node-sass` v4.
This fixes an error in the PHP 5.2 and 5.3 Travis builds after [44219].

Props netweb.
See #45241.
Fixes #45664.


git-svn-id: https://develop.svn.wordpress.org/trunk@44233 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 18:47:25 +00:00
Jonathan Desrosiers 6993b164b5 Build tools: Build webpack dev in grunt build.
For the WordPress zip we need both the minified and non-minified files. This is because of `SCRIPT_DEBUG`. So in grunt build we need to do both `grunt webpack:prod` and `grunt webpack:dev`.

Props bordoni, atimmer.

Merges [43817] to trunk.

Fixes #45156.

git-svn-id: https://develop.svn.wordpress.org/trunk@44161 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-14 04:35:59 +00:00
Gary Pendergast 934f0ca2b8 Build Tools: Copy package JavaScript and CSS into `wp-includes`.
- `grunt webpack:dev` now copies packages JS into `/src/wp-includes/js/dist`, and CSS into `/src/wp-includes/css/dist`.
- `grunt webpack:prod` does the same, but into `/build` instead of `/src`.
- `grunt build` now runs the `webpack:prod` task.

Merges [43760] from the 5.0 branch to trunk.

Props atimmer, pento.
Fixes #45119.



git-svn-id: https://develop.svn.wordpress.org/trunk@44159 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-14 04:10:26 +00:00
Jeremy Felt c125a50838 Build: Ignore the vendor directory during the jsvalidate:build task.
Merges [43783] from the 5.0 branch to trunk.

Props netweb.
Fixes #45119.


git-svn-id: https://develop.svn.wordpress.org/trunk@44135 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-14 01:37:40 +00:00
Anton Timmermans 7a2fa10e28 Build tools: Build @wordpress packages with webpack.
We decided to split the media webpack config into it's own file. The
main webpack config then combines this file with the packages config.

Include vendor scripts by copying them. We copy the minified files if
they are available. If they aren't available we minify the original
files ourselves.

Props omarreiss, herregroen, gziolo, youknowriad, netweb, adamsilverstein.
Merges [43719] to trunk.
See #45065.


git-svn-id: https://develop.svn.wordpress.org/trunk@44112 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 15:25:37 +00:00