Commit Graph

26 Commits

Author SHA1 Message Date
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
Sergey Biryukov fc48870953 Build/Test Tools: Remove `vendor` file name entry from `.gitignore`.
Props netweb.
Merges [43747] to trunk.
Fixes #43411.

git-svn-id: https://develop.svn.wordpress.org/trunk@44285 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-18 03:41:31 +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
jrf 3581d34bb0 Build/Tools: Update PHPCS ruleset for WP Core and related Composer setup.
`.gitignore` + `svn:ignore`:
* Add the typical filenames of overloaded PHPCS configs to `.gitignore`.

Composer:
* Use the `develop` (Packagist `dev-master`) version of WPCS as it contains lots of bugfixes.
* Remove the PHPCS dependency. This is a dependency of WPCS, not of WP Core itself. This will also make sure that the PHPCS version used is always one which is supported by WPCS.
* Refreshed the `composer.lock` file.

PHPCS ruleset:
* Removed a reference to a sniff which doesn't exist in WPCS yet.
* Use the PHPCS 3.x `basepath` option to clean up the file paths PHPCS shows in the reports.
* Use the PHPCS 3.x `parallel` option to enable parallel scanning whenever possible to speed up the scans.
* Whitelist the `wp-includes/l10n.php` file from issues being reported by the `WordPress.WP.I18n` sniff.

Fixes #44366.

git-svn-id: https://develop.svn.wordpress.org/trunk@43348 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-15 15:56:58 +00:00
Gary Pendergast ef37f002ee 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@43309 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-23 10:04:22 +00:00
Sergey Biryukov 6586a5c467 Build/Test Tools: Remove `vendor` file name entry from `.gitignore`.
Props netweb.
Fixes #43411.

git-svn-id: https://develop.svn.wordpress.org/trunk@42733 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-25 11:29:25 +00:00
John Blackbourn bad15e4289 Build/Test Tools: Instruct Git and Subversion to ignore Composer's `vendor` directory.
Props netweb 
Fixes #42909


git-svn-id: https://develop.svn.wordpress.org/trunk@42405 602fd350-edb4-49c9-b593-d223f7449a82
2017-12-16 13:37:15 +00:00
John Blackbourn 93fc60f36a Embeds: Add oEmbed support for someecards.com.
Props someecards

Fixes #40792


git-svn-id: https://develop.svn.wordpress.org/trunk@41681 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-02 19:09:46 +00:00
Adam Silverstein 203cb6f4a2 JSDocs: add the jsdoc folder to .gitignore and svn:ignore.
Props netweb.
Fixes #41682.


git-svn-id: https://develop.svn.wordpress.org/trunk@41381 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-15 20:13:04 +00:00
Weston Ruter 1c84857edf Build/Test Tools: Facilitate SVN and Git being co-located in the same directory.
Ignore .svn in .gitignore, and ignore .git in svn:ignore.

Fixes #39245.


git-svn-id: https://develop.svn.wordpress.org/trunk@39577 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-12 05:11:27 +00:00
Weston Ruter 1eff31e319 Git: Prevent untracked files from being ignored by git in bundled themes.
See #27207.
Fixes #38779.


git-svn-id: https://develop.svn.wordpress.org/trunk@39362 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-25 08:27:43 +00:00
Gary Pendergast 2a50523106 Git: Ignore patch related files, so they can't be accidentally committed.
This duplicates the changes in [39360] for git.

See #38727.



git-svn-id: https://develop.svn.wordpress.org/trunk@39361 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-25 04:46:23 +00:00
Pascal Birchler 1a0effca18 Revert [38401] after [38480].
See #36335.

git-svn-id: https://develop.svn.wordpress.org/trunk@38535 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-06 18:12:09 +00:00
Pascal Birchler 68175f94c3 After [38399], update the `.gitignore` file accordingly.
The following files have been added to `svn:ignore` already as they are not compatible with PHP 5.2:

* src/wp-vendor/autoload.php
* src/wp-vendor/composer/autoload_real.php
* src/wp-vendor/composer/autoload_static.php
* src/wp-vendor/composer/ClassLoader.php

See #36335.

git-svn-id: https://develop.svn.wordpress.org/trunk@38401 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-27 11:28:11 +00:00
Joe Hoyle 03f3276797 Remove accidental .svn addition to .gitignore
Introduced in 35890, oops!


git-svn-id: https://develop.svn.wordpress.org/trunk@35891 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-12 18:26:22 +00:00
Joe Hoyle a375d93001 REST API: Improve formatting of failed validation errors.
If a validation_callback returns a WP_Error it should give the same response format as if it returned `false`. This makes programmatically reading the validation errors better.

Props bradyvercher for initial patch.
Fixes #35028.


git-svn-id: https://develop.svn.wordpress.org/trunk@35890 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-12 18:22:02 +00:00
John Blackbourn 01a92d7908 Remove an IDE-specific rule in `.gitignore`. These should be managed in the user's `~/.gitignore_global` file.
Fixes #34345


git-svn-id: https://develop.svn.wordpress.org/trunk@35254 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-18 00:15:23 +00:00
Scott Taylor b757b37551 Unit Tests: after [35225], make `factory` a method/getter on `WP_UnitTestCase` and add magic methods for BC for every plugin that is extending `WP_UnitTestCase` and accessing the `$factory` instance prop.
Props nerrad, wonderboymusic.
See #30017, #33968.



git-svn-id: https://develop.svn.wordpress.org/trunk@35242 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-17 18:02:16 +00:00
Sergey Biryukov 0c664ec112 Ignore `.DS_Store` files.
props danielbachhuber.
fixes #31633.

git-svn-id: https://develop.svn.wordpress.org/trunk@31769 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-13 18:11:33 +00:00
Peter Westwood 4214aa3862 Ignore any local WP Cli config files.
Fixes #30134 props danielbachhuber


git-svn-id: https://develop.svn.wordpress.org/trunk@30050 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 17:01:22 +00:00
Mark Jaquith 7e70cdcb9b Remove twenty* ignore-exclusion lines. Already tracked.
see #27207. props TobiasBg.

git-svn-id: https://develop.svn.wordpress.org/trunk@27298 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-26 20:59:25 +00:00
Mark Jaquith 9907c09f1b More robust `.gitignore` file
fixes #27207. props TobiasBg, markjaquith.

git-svn-id: https://develop.svn.wordpress.org/trunk@27295 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-26 18:44:27 +00:00
Sergey Biryukov 0aaea5b6ef Add more .gitignore entries for unit test files.
props bpetty.
fixes #26375.

git-svn-id: https://develop.svn.wordpress.org/trunk@26578 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-03 18:48:58 +00:00
Andrew Nacin e5dddf77e8 Don't remove the compiled.html QUnit file. Ignore it instead.
props jorbin.
fixes #25781.


git-svn-id: https://develop.svn.wordpress.org/trunk@26108 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-12 23:20:28 +00:00
Andrew Nacin 0494df8152 Move wp-config-sample.php to the root of develop.svn.
wp-config.php is now created in the root. wp-config-sample.php is properly copied over to the build directory for syncing to core.svn.

Add some ignores.

fixes #25185, see #24976.



git-svn-id: https://develop.svn.wordpress.org/trunk@25173 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 20:45:17 +00:00
Andrew Nacin b43712e0f7 New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory.
 * New task runner (Grunt), configured to copy a built WordPress to build/.
 * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
 * Remove Akismet external from develop.svn. Still exists in core.svn.
 * Drop minified files from src/. The build process will now generate these.

props koop.
see #24976.

and see http://wp.me/p2AvED-1AI.



git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-07 05:25:25 +00:00