Go to file
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
src Build tools: Allow building WordPress to `src`. 2018-12-24 13:28:22 +00:00
tests Docs: Remove references to the now-defunct `$merged_filters` global from two method DocBlocks in `WP_UnitTestCase`. 2018-12-19 07:12:46 +00:00
tools Build tools: Allow building WordPress to `src`. 2018-12-24 13:28:22 +00:00
.editorconfig General: Instruct file editors not to trim trailing whitespace in markdown files. 2018-03-20 22:14:53 +00:00
.gitignore Build tools: Allow building WordPress to `src`. 2018-12-24 13:28:22 +00:00
.jshintrc General: Remove `.jshintrc` and `*.json` from the 2-space-indent `.editorconfig` group. 2017-10-12 01:57:45 +00:00
.npmrc Once upon a midnight dreary, while I coded, weak and weary, 2018-05-23 10:04:22 +00:00
.nvmrc Once upon a midnight dreary, while I coded, weak and weary, 2018-05-23 10:04:22 +00:00
.travis.yml Build Tools: Switch to Node 10.13.0. 2018-12-16 01:42:24 +00:00
Gruntfile.js Build tools: Allow building WordPress to `src`. 2018-12-24 13:28:22 +00:00
composer.json Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
composer.lock Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
jsdoc.conf.json Build Tools: Fix JSDoc configuration include paths. 2018-06-14 12:45:06 +00:00
package-lock.json Build tools: Allow building WordPress to `src`. 2018-12-24 13:28:22 +00:00
package.json External Libraries: zxcvbn library. 2018-12-20 21:02:16 +00:00
phpcs.xml.dist Multisite: Fix coding standard errors after [43654]. 2018-09-24 15:22:01 +00:00
phpunit.xml.dist REST API: Introduce Autosaves controller and endpoint. 2018-12-13 22:41:47 +00:00
webpack.config.js Build tools: Allow building WordPress to `src`. 2018-12-24 13:28:22 +00:00
wp-cli.yml Tools: Update `wp-cli.yml` to point to the `build` directory. 2018-05-25 00:14:14 +00:00
wp-config-sample.php Code is Poetry. 2017-11-30 23:09:33 +00:00
wp-tests-config-sample.php Build/Test Tools: Roses are red, this fixes stuff. 2018-05-23 17:54:44 +00:00