2013-10-27 22:53:11 +01:00
|
|
|
/* jshint node:true */
|
2018-12-24 14:53:11 +01:00
|
|
|
/* jshint esversion: 6 */
|
2017-10-03 09:11:28 +02:00
|
|
|
/* globals Set */
|
2018-12-11 17:38:21 +01:00
|
|
|
var webpackConfig = require( './webpack.config' );
|
2017-10-04 23:00:15 +02:00
|
|
|
|
2013-08-07 07:25:25 +02:00
|
|
|
module.exports = function(grunt) {
|
2013-10-27 22:53:11 +01:00
|
|
|
var path = require('path'),
|
2016-04-13 00:33:18 +02:00
|
|
|
fs = require( 'fs' ),
|
2017-10-03 09:11:28 +02:00
|
|
|
spawn = require( 'child_process' ).spawnSync,
|
2013-10-27 22:53:11 +01:00
|
|
|
SOURCE_DIR = 'src/',
|
2015-03-05 20:48:59 +01:00
|
|
|
BUILD_DIR = 'build/',
|
2018-12-24 14:28:22 +01:00
|
|
|
WORKING_DIR = grunt.option( 'dev' ) ? SOURCE_DIR : BUILD_DIR,
|
2017-08-19 22:09:31 +02:00
|
|
|
BANNER_TEXT = '/*! This file is auto-generated */',
|
2018-02-27 01:31:33 +01:00
|
|
|
autoprefixer = require( 'autoprefixer' ),
|
2018-12-16 19:47:25 +01:00
|
|
|
nodesass = require( 'node-sass' ),
|
2018-06-01 03:28:53 +02:00
|
|
|
phpUnitWatchGroup = grunt.option( 'group' ),
|
|
|
|
buildFiles = [
|
|
|
|
'*.php',
|
|
|
|
'*.txt',
|
|
|
|
'*.html',
|
|
|
|
'wp-includes/**', // Include everything in wp-includes.
|
|
|
|
'wp-admin/**', // Include everything in wp-admin.
|
|
|
|
'wp-content/index.php',
|
2018-12-17 00:33:38 +01:00
|
|
|
'wp-content/themes/index.php',
|
|
|
|
'wp-content/themes/twenty*/**',
|
2018-06-01 03:28:53 +02:00
|
|
|
'wp-content/plugins/index.php',
|
|
|
|
'wp-content/plugins/hello.php',
|
|
|
|
'wp-content/plugins/akismet/**'
|
2018-12-24 14:44:05 +01:00
|
|
|
],
|
|
|
|
changedFiles = {
|
|
|
|
php: []
|
|
|
|
};
|
2018-02-27 01:31:33 +01:00
|
|
|
|
|
|
|
if ( 'watch:phpunit' === grunt.cli.tasks[ 0 ] && ! phpUnitWatchGroup ) {
|
|
|
|
grunt.log.writeln();
|
|
|
|
grunt.fail.fatal(
|
|
|
|
'Missing required parameters. Example usage: ' + '\n\n' +
|
|
|
|
'grunt watch:phpunit --group=community-events' + '\n' +
|
|
|
|
'grunt watch:phpunit --group=multisite,mail'
|
|
|
|
);
|
|
|
|
}
|
2013-08-07 07:25:25 +02:00
|
|
|
|
2013-11-14 19:16:59 +01:00
|
|
|
// Load tasks.
|
2014-06-21 21:44:26 +02:00
|
|
|
require('matchdep').filterDev(['grunt-*', '!grunt-legacy-util']).forEach( grunt.loadNpmTasks );
|
|
|
|
// Load legacy utils
|
|
|
|
grunt.util = require('grunt-legacy-util');
|
2013-09-04 22:50:29 +02:00
|
|
|
|
2013-08-07 07:25:25 +02:00
|
|
|
// Project configuration.
|
|
|
|
grunt.initConfig({
|
2015-07-08 21:53:22 +02:00
|
|
|
postcss: {
|
2014-02-13 09:29:16 +01:00
|
|
|
options: {
|
2015-07-08 21:53:22 +02:00
|
|
|
processors: [
|
|
|
|
autoprefixer({
|
2015-11-02 21:43:55 +01:00
|
|
|
browsers: [
|
Update autoprefixer browser support matrix
WordPress no longer supports many old old browsers: https://make.wordpress.org/core/2017/04/23/target-browser-coverage/
This also removes alot of no longer necessary CSS. It served us well, but we are never getting back together with IE8,9,10.
So, in the (paraphrased) words of Taylor Swift:
I remember when we dropped support the first time
Saying, "This is it, I've had enough, " 'cause like
We hadn't seen many users in a month
When you said you needed flexbox. (What?)
Then you postMessage again and say
"IE8, I miss you and I swear I'm gonna change, trust me."
Remember how that lasted for a day?
I say, "I hate the box model, " we break up, you call me, "I love css-grids."
Ooh, we called it off again last night
But ooh, this time I'm telling you, I'm telling you
We are never ever ever supporting IE 8,9,10,
We are never ever ever supporting IE 8,9,10,
You go talk to EDGE, talk to my FIREFOX, talk to CHROME
But we are never ever ever ever getting back together
Like, ever...
Fixes #37651.
Props stunnedbeast, netweb, jorbin.
git-svn-id: https://develop.svn.wordpress.org/trunk@41062 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-16 03:14:36 +02:00
|
|
|
'> 1%',
|
|
|
|
'ie >= 11',
|
|
|
|
'last 1 Android versions',
|
|
|
|
'last 1 ChromeAndroid versions',
|
|
|
|
'last 2 Chrome versions',
|
|
|
|
'last 2 Firefox versions',
|
|
|
|
'last 2 Safari versions',
|
|
|
|
'last 2 iOS versions',
|
|
|
|
'last 2 Edge versions',
|
|
|
|
'last 2 Opera versions'
|
2015-11-02 21:43:55 +01:00
|
|
|
],
|
2015-07-08 21:53:22 +02:00
|
|
|
cascade: false
|
|
|
|
})
|
|
|
|
]
|
2014-02-13 09:29:16 +01:00
|
|
|
},
|
|
|
|
core: {
|
|
|
|
expand: true,
|
|
|
|
cwd: SOURCE_DIR,
|
|
|
|
dest: SOURCE_DIR,
|
|
|
|
src: [
|
|
|
|
'wp-admin/css/*.css',
|
|
|
|
'wp-includes/css/*.css'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
colors: {
|
|
|
|
expand: true,
|
2018-12-24 14:28:22 +01:00
|
|
|
cwd: WORKING_DIR,
|
|
|
|
dest: WORKING_DIR,
|
2014-02-13 09:29:16 +01:00
|
|
|
src: [
|
|
|
|
'wp-admin/css/colors/*/colors.css'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-08-19 22:09:31 +02:00
|
|
|
usebanner: {
|
|
|
|
options: {
|
|
|
|
position: 'top',
|
|
|
|
banner: BANNER_TEXT,
|
2017-08-20 11:12:36 +02:00
|
|
|
linebreak: true
|
2017-08-19 22:09:31 +02:00
|
|
|
},
|
|
|
|
files: {
|
|
|
|
src: [
|
2018-12-24 14:28:22 +01:00
|
|
|
WORKING_DIR + 'wp-admin/css/*.min.css',
|
|
|
|
WORKING_DIR + 'wp-includes/css/*.min.css',
|
|
|
|
WORKING_DIR + 'wp-admin/css/colors/*/*.css'
|
2017-08-19 22:09:31 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2013-08-07 07:25:25 +02:00
|
|
|
clean: {
|
2018-06-01 03:28:53 +02:00
|
|
|
plugins: [BUILD_DIR + 'wp-content/plugins'],
|
|
|
|
themes: [BUILD_DIR + 'wp-content/themes'],
|
2018-12-24 14:28:22 +01:00
|
|
|
files: buildFiles.map( function( file ) {
|
|
|
|
return BUILD_DIR + file;
|
|
|
|
}),
|
|
|
|
css: [
|
|
|
|
WORKING_DIR + 'wp-admin/css/*.min.css',
|
|
|
|
WORKING_DIR + 'wp-admin/css/*rtl*',
|
|
|
|
WORKING_DIR + 'wp-includes/css/*.min.css',
|
|
|
|
WORKING_DIR + 'wp-includes/css/*rtl*',
|
|
|
|
WORKING_DIR + 'wp-admin/css/colors/**/*.css'
|
|
|
|
],
|
|
|
|
js: [
|
|
|
|
WORKING_DIR + 'wp-admin/js/',
|
|
|
|
WORKING_DIR + 'wp-includes/js/'
|
2018-12-18 04:13:58 +01:00
|
|
|
],
|
2013-08-07 07:25:25 +02:00
|
|
|
dynamic: {
|
|
|
|
dot: true,
|
|
|
|
expand: true,
|
2018-12-24 14:28:22 +01:00
|
|
|
cwd: WORKING_DIR,
|
2013-08-07 07:25:25 +02:00
|
|
|
src: []
|
|
|
|
},
|
2013-11-09 21:43:58 +01:00
|
|
|
qunit: ['tests/qunit/compiled.html']
|
2013-08-07 07:25:25 +02:00
|
|
|
},
|
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 12:04:22 +02:00
|
|
|
file_append: {
|
|
|
|
default_options: {
|
|
|
|
files: [
|
|
|
|
{
|
|
|
|
append: 'jQuery.noConflict();',
|
2018-12-24 14:28:22 +01:00
|
|
|
input: WORKING_DIR + 'wp-includes/js/jquery/jquery.js',
|
|
|
|
output: WORKING_DIR + 'wp-includes/js/jquery/jquery.js'
|
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 12:04:22 +02:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2013-08-07 07:25:25 +02:00
|
|
|
copy: {
|
2013-10-06 12:33:01 +02:00
|
|
|
files: {
|
2013-08-29 22:45:17 +02:00
|
|
|
files: [
|
|
|
|
{
|
|
|
|
dot: true,
|
|
|
|
expand: true,
|
|
|
|
cwd: SOURCE_DIR,
|
2018-06-01 03:28:53 +02:00
|
|
|
src: buildFiles.concat( [
|
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 12:04:22 +02:00
|
|
|
'!js/**', // JavaScript is extracted into separate copy tasks.
|
2018-06-01 03:28:53 +02:00
|
|
|
'!.{svn,git}', // Exclude version control folders.
|
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 12:04:22 +02:00
|
|
|
'!wp-includes/version.php', // Exclude version.php
|
2018-12-18 04:13:58 +01:00
|
|
|
'!**/*.map', // The build doesn't need .map files.
|
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 12:04:22 +02:00
|
|
|
'!index.php', '!wp-admin/index.php',
|
|
|
|
'!_index.php', '!wp-admin/_index.php'
|
2018-06-01 03:28:53 +02:00
|
|
|
] ),
|
2013-08-29 22:45:17 +02:00
|
|
|
dest: BUILD_DIR
|
|
|
|
},
|
|
|
|
{
|
|
|
|
src: 'wp-config-sample.php',
|
|
|
|
dest: BUILD_DIR
|
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 12:04:22 +02:00
|
|
|
},
|
|
|
|
{
|
2018-12-24 14:28:22 +01:00
|
|
|
[BUILD_DIR + 'index.php']: ['src/_index.php'],
|
|
|
|
[BUILD_DIR + 'wp-admin/index.php']: ['src/wp-admin/_index.php']
|
2013-08-29 22:45:17 +02:00
|
|
|
}
|
|
|
|
]
|
2013-08-07 07:25:25 +02:00
|
|
|
},
|
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 12:04:22 +02:00
|
|
|
'npm-packages': {
|
2019-01-10 02:38:22 +01:00
|
|
|
files: [
|
|
|
|
{
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/backbone.js' ]: [ './node_modules/backbone/backbone.js' ],
|
2019-03-27 23:30:26 +01:00
|
|
|
[ WORKING_DIR + 'wp-includes/js/clipboard.js' ]: [ './node_modules/clipboard/dist/clipboard.js' ],
|
2019-01-10 02:38:22 +01:00
|
|
|
[ WORKING_DIR + 'wp-includes/js/hoverIntent.js' ]: [ './node_modules/jquery-hoverintent/jquery.hoverIntent.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/imagesloaded.min.js' ]: [ './node_modules/imagesloaded/imagesloaded.pkgd.min.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/jquery/jquery-migrate.js' ]: [ './node_modules/jquery-migrate/dist/jquery-migrate.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/jquery/jquery-migrate.min.js' ]: [ './node_modules/jquery-migrate/dist/jquery-migrate.min.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/jquery/jquery.form.js' ]: [ './node_modules/jquery-form/src/jquery.form.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/masonry.min.js' ]: [ './node_modules/masonry-layout/dist/masonry.pkgd.min.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/twemoji.js' ]: [ './node_modules/twemoji/2/twemoji.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/underscore.js' ]: [ './node_modules/underscore/underscore.js' ],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
expand: true,
|
|
|
|
cwd: './node_modules/jquery-ui/ui/',
|
|
|
|
src: '*.js',
|
|
|
|
dest: SOURCE_DIR + 'wp-includes/js/jquery/ui/'
|
|
|
|
}
|
|
|
|
]
|
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 12:04:22 +02:00
|
|
|
},
|
|
|
|
'vendor-js': {
|
|
|
|
files: [
|
|
|
|
{
|
|
|
|
expand: true,
|
|
|
|
cwd: SOURCE_DIR + 'js/_enqueues/vendor/',
|
|
|
|
src: [
|
|
|
|
'**/*',
|
|
|
|
'!farbtastic.js',
|
|
|
|
'!iris.min.js',
|
|
|
|
'!deprecated/**',
|
|
|
|
'!README.md',
|
|
|
|
// Ignore unminified version of vendor lib we don't ship.
|
|
|
|
'!jquery/jquery.masonry.js',
|
|
|
|
'!tinymce/tinymce.js'
|
|
|
|
],
|
2018-12-24 14:28:22 +01:00
|
|
|
dest: WORKING_DIR + 'wp-includes/js/'
|
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 12:04:22 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
expand: true,
|
|
|
|
cwd: SOURCE_DIR + 'js/_enqueues/vendor/',
|
|
|
|
src: [
|
|
|
|
'farbtastic.js',
|
|
|
|
'iris.min.js'
|
|
|
|
],
|
2018-12-24 14:28:22 +01:00
|
|
|
dest: WORKING_DIR + 'wp-admin/js/'
|
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 12:04:22 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
expand: true,
|
|
|
|
cwd: SOURCE_DIR + 'js/_enqueues/vendor/deprecated',
|
|
|
|
src: [
|
|
|
|
'suggest*'
|
|
|
|
],
|
2018-12-24 14:28:22 +01:00
|
|
|
dest: WORKING_DIR + 'wp-includes/js/jquery/'
|
2019-01-10 02:38:22 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
expand: true,
|
|
|
|
cwd: SOURCE_DIR + 'js/_enqueues/vendor/tinymce/',
|
|
|
|
src: 'tinymce.js',
|
|
|
|
dest: SOURCE_DIR + 'wp-includes/js/tinymce/'
|
|
|
|
},
|
|
|
|
|
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 12:04:22 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
'admin-js': {
|
|
|
|
files: {
|
2018-12-24 14:28:22 +01:00
|
|
|
[ WORKING_DIR + 'wp-admin/js/accordion.js' ]: [ './src/js/_enqueues/lib/accordion.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/code-editor.js' ]: [ './src/js/_enqueues/wp/code-editor.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/color-picker.js' ]: [ './src/js/_enqueues/lib/color-picker.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/comment.js' ]: [ './src/js/_enqueues/admin/comment.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/common.js' ]: [ './src/js/_enqueues/admin/common.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/custom-background.js' ]: [ './src/js/_enqueues/admin/custom-background.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/custom-header.js' ]: [ './src/js/_enqueues/admin/custom-header.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/customize-controls.js' ]: [ './src/js/_enqueues/wp/customize/controls.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/customize-nav-menus.js' ]: [ './src/js/_enqueues/wp/customize/nav-menus.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/customize-widgets.js' ]: [ './src/js/_enqueues/wp/customize/widgets.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/dashboard.js' ]: [ './src/js/_enqueues/wp/dashboard.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/edit-comments.js' ]: [ './src/js/_enqueues/admin/edit-comments.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/editor-expand.js' ]: [ './src/js/_enqueues/wp/editor/dfw.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/editor.js' ]: [ './src/js/_enqueues/wp/editor/base.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/gallery.js' ]: [ './src/js/_enqueues/lib/gallery.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/image-edit.js' ]: [ './src/js/_enqueues/lib/image-edit.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/inline-edit-post.js' ]: [ './src/js/_enqueues/admin/inline-edit-post.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/inline-edit-tax.js' ]: [ './src/js/_enqueues/admin/inline-edit-tax.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/language-chooser.js' ]: [ './src/js/_enqueues/lib/language-chooser.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/link.js' ]: [ './src/js/_enqueues/admin/link.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/media-gallery.js' ]: [ './src/js/_enqueues/deprecated/media-gallery.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/media-upload.js' ]: [ './src/js/_enqueues/admin/media-upload.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/media.js' ]: [ './src/js/_enqueues/admin/media.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/nav-menu.js' ]: [ './src/js/_enqueues/lib/nav-menu.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/password-strength-meter.js' ]: [ './src/js/_enqueues/wp/password-strength-meter.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/plugin-install.js' ]: [ './src/js/_enqueues/admin/plugin-install.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/post.js' ]: [ './src/js/_enqueues/admin/post.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/postbox.js' ]: [ './src/js/_enqueues/admin/postbox.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/revisions.js' ]: [ './src/js/_enqueues/wp/revisions.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/set-post-thumbnail.js' ]: [ './src/js/_enqueues/admin/set-post-thumbnail.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/svg-painter.js' ]: [ './src/js/_enqueues/wp/svg-painter.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/tags-box.js' ]: [ './src/js/_enqueues/admin/tags-box.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/tags-suggest.js' ]: [ './src/js/_enqueues/admin/tags-suggest.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/tags.js' ]: [ './src/js/_enqueues/admin/tags.js' ],
|
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 04:54:16 +01:00
|
|
|
[ WORKING_DIR + 'wp-admin/js/site-health.js' ]: [ './src/js/_enqueues/admin/site-health.js' ],
|
2018-12-24 14:28:22 +01:00
|
|
|
[ WORKING_DIR + 'wp-admin/js/theme-plugin-editor.js' ]: [ './src/js/_enqueues/wp/theme-plugin-editor.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/theme.js' ]: [ './src/js/_enqueues/wp/theme.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/updates.js' ]: [ './src/js/_enqueues/wp/updates.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/user-profile.js' ]: [ './src/js/_enqueues/admin/user-profile.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/user-suggest.js' ]: [ './src/js/_enqueues/lib/user-suggest.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/widgets/custom-html-widgets.js' ]: [ './src/js/_enqueues/wp/widgets/custom-html.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/widgets/media-audio-widget.js' ]: [ './src/js/_enqueues/wp/widgets/media-audio.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/widgets/media-gallery-widget.js' ]: [ './src/js/_enqueues/wp/widgets/media-gallery.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/widgets/media-image-widget.js' ]: [ './src/js/_enqueues/wp/widgets/media-image.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/widgets/media-video-widget.js' ]: [ './src/js/_enqueues/wp/widgets/media-video.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/widgets/media-widgets.js' ]: [ './src/js/_enqueues/wp/widgets/media.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/widgets/text-widgets.js' ]: [ './src/js/_enqueues/wp/widgets/text.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/widgets.js' ]: [ './src/js/_enqueues/admin/widgets.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/word-count.js' ]: [ './src/js/_enqueues/wp/utils/word-count.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/wp-fullscreen-stub.js' ]: [ './src/js/_enqueues/deprecated/fullscreen-stub.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-admin/js/xfn.js' ]: [ './src/js/_enqueues/admin/xfn.js' ]
|
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 12:04:22 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
'includes-js': {
|
|
|
|
files: {
|
2018-12-24 14:28:22 +01:00
|
|
|
[ WORKING_DIR + 'wp-includes/js/admin-bar.js' ]: [ './src/js/_enqueues/lib/admin-bar.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/api-request.js' ]: [ './src/js/_enqueues/wp/api-request.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/autosave.js' ]: [ './src/js/_enqueues/wp/autosave.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/comment-reply.js' ]: [ './src/js/_enqueues/lib/comment-reply.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/customize-base.js' ]: [ './src/js/_enqueues/wp/customize/base.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/customize-loader.js' ]: [ './src/js/_enqueues/wp/customize/loader.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/customize-models.js' ]: [ './src/js/_enqueues/wp/customize/models.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/customize-preview-nav-menus.js' ]: [ './src/js/_enqueues/wp/customize/preview-nav-menus.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/customize-preview-widgets.js' ]: [ './src/js/_enqueues/wp/customize/preview-widgets.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/customize-preview.js' ]: [ './src/js/_enqueues/wp/customize/preview.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/customize-selective-refresh.js' ]: [ './src/js/_enqueues/wp/customize/selective-refresh.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/customize-views.js' ]: [ './src/js/_enqueues/wp/customize/views.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/heartbeat.js' ]: [ './src/js/_enqueues/wp/heartbeat.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/mce-view.js' ]: [ './src/js/_enqueues/wp/mce-view.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/media-editor.js' ]: [ './src/js/_enqueues/wp/media/editor.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/quicktags.js' ]: [ './src/js/_enqueues/lib/quicktags.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/shortcode.js' ]: [ './src/js/_enqueues/wp/shortcode.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/utils.js' ]: [ './src/js/_enqueues/lib/cookies.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wp-a11y.js' ]: [ './src/js/_enqueues/wp/a11y.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wp-ajax-response.js' ]: [ './src/js/_enqueues/lib/ajax-response.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wp-api.js' ]: [ './src/js/_enqueues/wp/api.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wp-auth-check.js' ]: [ './src/js/_enqueues/lib/auth-check.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wp-backbone.js' ]: [ './src/js/_enqueues/wp/backbone.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wp-custom-header.js' ]: [ './src/js/_enqueues/wp/custom-header.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wp-embed-template.js' ]: [ './src/js/_enqueues/lib/embed-template.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wp-embed.js' ]: [ './src/js/_enqueues/wp/embed.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wp-emoji-loader.js' ]: [ './src/js/_enqueues/lib/emoji-loader.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wp-emoji.js' ]: [ './src/js/_enqueues/wp/emoji.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wp-list-revisions.js' ]: [ './src/js/_enqueues/lib/list-revisions.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wp-lists.js' ]: [ './src/js/_enqueues/lib/lists.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wp-pointer.js' ]: [ './src/js/_enqueues/lib/pointer.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wp-sanitize.js' ]: [ './src/js/_enqueues/wp/sanitize.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wp-util.js' ]: [ './src/js/_enqueues/wp/util.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wpdialog.js' ]: [ './src/js/_enqueues/lib/dialog.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/wplink.js' ]: [ './src/js/_enqueues/lib/link.js' ],
|
|
|
|
[ WORKING_DIR + 'wp-includes/js/zxcvbn-async.js' ]: [ './src/js/_enqueues/lib/zxcvbn-async.js' ]
|
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 12:04:22 +02:00
|
|
|
}
|
|
|
|
},
|
2016-01-18 10:56:06 +01:00
|
|
|
'wp-admin-css-compat-rtl': {
|
2014-02-19 22:42:36 +01:00
|
|
|
options: {
|
|
|
|
processContent: function( src ) {
|
|
|
|
return src.replace( /\.css/g, '-rtl.css' );
|
|
|
|
}
|
|
|
|
},
|
|
|
|
src: SOURCE_DIR + 'wp-admin/css/wp-admin.css',
|
2018-12-24 14:28:22 +01:00
|
|
|
dest: WORKING_DIR + 'wp-admin/css/wp-admin-rtl.css'
|
2014-02-19 22:42:36 +01:00
|
|
|
},
|
2016-01-18 10:56:06 +01:00
|
|
|
'wp-admin-css-compat-min': {
|
|
|
|
options: {
|
|
|
|
processContent: function( src ) {
|
|
|
|
return src.replace( /\.css/g, '.min.css' );
|
|
|
|
}
|
|
|
|
},
|
|
|
|
files: [
|
|
|
|
{
|
|
|
|
src: SOURCE_DIR + 'wp-admin/css/wp-admin.css',
|
2018-12-24 14:28:22 +01:00
|
|
|
dest: WORKING_DIR + 'wp-admin/css/wp-admin.min.css'
|
2016-01-18 10:56:06 +01:00
|
|
|
},
|
|
|
|
{
|
2018-12-24 14:28:22 +01:00
|
|
|
src: WORKING_DIR + 'wp-admin/css/wp-admin-rtl.css',
|
|
|
|
dest: WORKING_DIR + 'wp-admin/css/wp-admin-rtl.min.css'
|
2016-01-18 10:56:06 +01:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2013-10-06 12:33:01 +02:00
|
|
|
version: {
|
|
|
|
options: {
|
2013-10-27 22:53:11 +01:00
|
|
|
processContent: function( src ) {
|
2014-05-29 06:32:41 +02:00
|
|
|
return src.replace( /^\$wp_version = '(.+?)';/m, function( str, version ) {
|
|
|
|
version = version.replace( /-src$/, '' );
|
|
|
|
|
2016-01-15 12:53:29 +01:00
|
|
|
// If the version includes an SVN commit (-12345), it's not a released alpha/beta. Append a timestamp.
|
2016-01-20 03:01:57 +01:00
|
|
|
version = version.replace( /-[\d]{5}$/, '-' + grunt.template.today( 'yyyymmdd.HHMMss' ) );
|
2014-05-29 06:32:41 +02:00
|
|
|
|
2014-05-29 21:33:00 +02:00
|
|
|
/* jshint quotmark: true */
|
2014-05-29 06:32:41 +02:00
|
|
|
return "$wp_version = '" + version + "';";
|
|
|
|
});
|
2013-10-06 12:33:01 +02:00
|
|
|
}
|
|
|
|
},
|
2014-02-19 22:42:36 +01:00
|
|
|
src: SOURCE_DIR + 'wp-includes/version.php',
|
|
|
|
dest: BUILD_DIR + 'wp-includes/version.php'
|
2013-10-06 12:33:01 +02:00
|
|
|
},
|
2013-08-07 07:25:25 +02:00
|
|
|
dynamic: {
|
|
|
|
dot: true,
|
|
|
|
expand: true,
|
|
|
|
cwd: SOURCE_DIR,
|
2018-12-24 14:28:22 +01:00
|
|
|
dest: WORKING_DIR,
|
2013-08-07 07:25:25 +02:00
|
|
|
src: []
|
2013-11-09 21:43:58 +01:00
|
|
|
},
|
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 12:04:22 +02:00
|
|
|
'dynamic-js': {
|
|
|
|
files: {}
|
|
|
|
},
|
2013-11-09 22:18:23 +01:00
|
|
|
qunit: {
|
2013-11-09 21:43:58 +01:00
|
|
|
src: 'tests/qunit/index.html',
|
|
|
|
dest: 'tests/qunit/compiled.html',
|
|
|
|
options: {
|
|
|
|
processContent: function( src ) {
|
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 12:04:22 +02:00
|
|
|
return src.replace( /(\".+?\/)build(\/.+?)(?:.min)?(.js\")/g , function( match, $1, $2, $3 ) {
|
2015-06-06 21:57:54 +02:00
|
|
|
// Don't add `.min` to files that don't have it.
|
|
|
|
return $1 + 'build' + $2 + ( /jquery$/.test( $2 ) ? '' : '.min' ) + $3;
|
|
|
|
} );
|
2013-11-09 21:43:58 +01:00
|
|
|
}
|
|
|
|
}
|
2013-08-07 07:25:25 +02:00
|
|
|
}
|
|
|
|
},
|
Merge the color schemes component from MP6. Introduces Light, Blue, and Midnight.
Color scheme selection on your own profile page gives you a preview and autosaves the selection.
Also introduces the usage of a preprocessor for core files, namely Sass. For 3.8, we will not expand its implementation past the color schemes. This does require Ruby as well as Sass 3.3.0+ due to the usage of the sourcemap option.
Note that only the default color scheme is available when running out of src. Use build to test the rest as well as the color picker.
props ryelle, melchoyce, tillkruess, drw158, littlethingsstudio, helen. see #25858, #22862.
git-svn-id: https://develop.svn.wordpress.org/trunk@26137 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-13 20:37:10 +01:00
|
|
|
sass: {
|
|
|
|
colors: {
|
2013-11-14 00:37:30 +01:00
|
|
|
expand: true,
|
|
|
|
cwd: SOURCE_DIR,
|
2018-12-24 14:28:22 +01:00
|
|
|
dest: WORKING_DIR,
|
2013-11-14 00:37:30 +01:00
|
|
|
ext: '.css',
|
2013-12-03 22:13:14 +01:00
|
|
|
src: ['wp-admin/css/colors/*/colors.scss'],
|
Merge the color schemes component from MP6. Introduces Light, Blue, and Midnight.
Color scheme selection on your own profile page gives you a preview and autosaves the selection.
Also introduces the usage of a preprocessor for core files, namely Sass. For 3.8, we will not expand its implementation past the color schemes. This does require Ruby as well as Sass 3.3.0+ due to the usage of the sourcemap option.
Note that only the default color scheme is available when running out of src. Use build to test the rest as well as the color picker.
props ryelle, melchoyce, tillkruess, drw158, littlethingsstudio, helen. see #25858, #22862.
git-svn-id: https://develop.svn.wordpress.org/trunk@26137 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-13 20:37:10 +01:00
|
|
|
options: {
|
2018-12-16 19:47:25 +01:00
|
|
|
implementation: nodesass,
|
2013-11-14 00:37:30 +01:00
|
|
|
outputStyle: 'expanded'
|
|
|
|
}
|
Merge the color schemes component from MP6. Introduces Light, Blue, and Midnight.
Color scheme selection on your own profile page gives you a preview and autosaves the selection.
Also introduces the usage of a preprocessor for core files, namely Sass. For 3.8, we will not expand its implementation past the color schemes. This does require Ruby as well as Sass 3.3.0+ due to the usage of the sourcemap option.
Note that only the default color scheme is available when running out of src. Use build to test the rest as well as the color picker.
props ryelle, melchoyce, tillkruess, drw158, littlethingsstudio, helen. see #25858, #22862.
git-svn-id: https://develop.svn.wordpress.org/trunk@26137 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-13 20:37:10 +01:00
|
|
|
}
|
|
|
|
},
|
2013-08-07 07:25:25 +02:00
|
|
|
cssmin: {
|
2014-02-19 22:42:36 +01:00
|
|
|
options: {
|
2015-11-18 21:27:45 +01:00
|
|
|
compatibility: 'ie7'
|
2014-02-19 22:42:36 +01:00
|
|
|
},
|
2013-08-07 07:25:25 +02:00
|
|
|
core: {
|
|
|
|
expand: true,
|
2018-12-24 14:28:22 +01:00
|
|
|
cwd: WORKING_DIR,
|
|
|
|
dest: WORKING_DIR,
|
2013-08-07 07:25:25 +02:00
|
|
|
ext: '.min.css',
|
|
|
|
src: [
|
2016-01-18 10:56:06 +01:00
|
|
|
'wp-admin/css/*.css',
|
|
|
|
'!wp-admin/css/wp-admin*.css',
|
2016-02-29 21:42:10 +01:00
|
|
|
'wp-includes/css/*.css',
|
|
|
|
'wp-includes/js/mediaelement/wp-mediaelement.css'
|
2013-08-07 07:25:25 +02:00
|
|
|
]
|
2013-11-12 22:18:45 +01:00
|
|
|
},
|
|
|
|
rtl: {
|
|
|
|
expand: true,
|
2018-12-24 14:28:22 +01:00
|
|
|
cwd: WORKING_DIR,
|
|
|
|
dest: WORKING_DIR,
|
2013-11-12 22:18:45 +01:00
|
|
|
ext: '.min.css',
|
|
|
|
src: [
|
2016-01-18 10:56:06 +01:00
|
|
|
'wp-admin/css/*-rtl.css',
|
|
|
|
'!wp-admin/css/wp-admin*.css',
|
2013-11-12 22:18:45 +01:00
|
|
|
'wp-includes/css/*-rtl.css'
|
|
|
|
]
|
Merge the color schemes component from MP6. Introduces Light, Blue, and Midnight.
Color scheme selection on your own profile page gives you a preview and autosaves the selection.
Also introduces the usage of a preprocessor for core files, namely Sass. For 3.8, we will not expand its implementation past the color schemes. This does require Ruby as well as Sass 3.3.0+ due to the usage of the sourcemap option.
Note that only the default color scheme is available when running out of src. Use build to test the rest as well as the color picker.
props ryelle, melchoyce, tillkruess, drw158, littlethingsstudio, helen. see #25858, #22862.
git-svn-id: https://develop.svn.wordpress.org/trunk@26137 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-13 20:37:10 +01:00
|
|
|
},
|
|
|
|
colors: {
|
|
|
|
expand: true,
|
2018-12-24 14:28:22 +01:00
|
|
|
cwd: WORKING_DIR,
|
|
|
|
dest: WORKING_DIR,
|
Merge the color schemes component from MP6. Introduces Light, Blue, and Midnight.
Color scheme selection on your own profile page gives you a preview and autosaves the selection.
Also introduces the usage of a preprocessor for core files, namely Sass. For 3.8, we will not expand its implementation past the color schemes. This does require Ruby as well as Sass 3.3.0+ due to the usage of the sourcemap option.
Note that only the default color scheme is available when running out of src. Use build to test the rest as well as the color picker.
props ryelle, melchoyce, tillkruess, drw158, littlethingsstudio, helen. see #25858, #22862.
git-svn-id: https://develop.svn.wordpress.org/trunk@26137 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-13 20:37:10 +01:00
|
|
|
ext: '.min.css',
|
|
|
|
src: [
|
2013-12-06 22:23:21 +01:00
|
|
|
'wp-admin/css/colors/*/*.css'
|
Merge the color schemes component from MP6. Introduces Light, Blue, and Midnight.
Color scheme selection on your own profile page gives you a preview and autosaves the selection.
Also introduces the usage of a preprocessor for core files, namely Sass. For 3.8, we will not expand its implementation past the color schemes. This does require Ruby as well as Sass 3.3.0+ due to the usage of the sourcemap option.
Note that only the default color scheme is available when running out of src. Use build to test the rest as well as the color picker.
props ryelle, melchoyce, tillkruess, drw158, littlethingsstudio, helen. see #25858, #22862.
git-svn-id: https://develop.svn.wordpress.org/trunk@26137 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-13 20:37:10 +01:00
|
|
|
]
|
2013-11-12 22:18:45 +01:00
|
|
|
}
|
|
|
|
},
|
2015-02-27 14:40:03 +01:00
|
|
|
rtlcss: {
|
|
|
|
options: {
|
|
|
|
// rtlcss options
|
2016-03-10 17:00:11 +01:00
|
|
|
opts: {
|
|
|
|
clean: false,
|
|
|
|
processUrls: { atrule: true, decl: false },
|
2015-02-27 14:40:03 +01:00
|
|
|
stringMap: [
|
|
|
|
{
|
|
|
|
name: 'import-rtl-stylesheet',
|
2016-03-10 17:00:11 +01:00
|
|
|
priority: 10,
|
|
|
|
exclusive: true,
|
2015-02-27 14:40:03 +01:00
|
|
|
search: [ '.css' ],
|
|
|
|
replace: [ '-rtl.css' ],
|
|
|
|
options: {
|
|
|
|
scope: 'url',
|
|
|
|
ignoreCase: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2013-12-06 19:34:05 +01:00
|
|
|
},
|
2016-03-10 17:00:11 +01:00
|
|
|
saveUnmodified: false,
|
|
|
|
plugins: [
|
2015-02-27 21:18:05 +01:00
|
|
|
{
|
|
|
|
name: 'swap-dashicons-left-right-arrows',
|
2016-03-10 17:00:11 +01:00
|
|
|
priority: 10,
|
|
|
|
directives: {
|
|
|
|
control: {},
|
|
|
|
value: []
|
|
|
|
},
|
|
|
|
processors: [
|
|
|
|
{
|
|
|
|
expr: /content/im,
|
|
|
|
action: function( prop, value ) {
|
|
|
|
if ( value === '"\\f141"' ) { // dashicons-arrow-left
|
|
|
|
value = '"\\f139"';
|
|
|
|
} else if ( value === '"\\f340"' ) { // dashicons-arrow-left-alt
|
|
|
|
value = '"\\f344"';
|
|
|
|
} else if ( value === '"\\f341"' ) { // dashicons-arrow-left-alt2
|
|
|
|
value = '"\\f345"';
|
|
|
|
} else if ( value === '"\\f139"' ) { // dashicons-arrow-right
|
|
|
|
value = '"\\f141"';
|
|
|
|
} else if ( value === '"\\f344"' ) { // dashicons-arrow-right-alt
|
|
|
|
value = '"\\f340"';
|
|
|
|
} else if ( value === '"\\f345"' ) { // dashicons-arrow-right-alt2
|
|
|
|
value = '"\\f341"';
|
|
|
|
}
|
|
|
|
return { prop: prop, value: value };
|
|
|
|
}
|
2015-02-27 21:18:05 +01:00
|
|
|
}
|
2016-03-10 17:00:11 +01:00
|
|
|
]
|
2015-02-27 21:18:05 +01:00
|
|
|
}
|
2016-03-10 17:00:11 +01:00
|
|
|
]
|
2015-02-27 14:40:03 +01:00
|
|
|
},
|
|
|
|
core: {
|
2013-11-12 22:18:45 +01:00
|
|
|
expand: true,
|
|
|
|
cwd: SOURCE_DIR,
|
2018-12-24 14:28:22 +01:00
|
|
|
dest: WORKING_DIR,
|
2013-11-12 22:18:45 +01:00
|
|
|
ext: '-rtl.css',
|
|
|
|
src: [
|
|
|
|
'wp-admin/css/*.css',
|
2015-02-27 21:18:05 +01:00
|
|
|
'wp-includes/css/*.css',
|
|
|
|
|
2019-05-16 04:24:58 +02:00
|
|
|
// Exclude minified and already processed files, and files from external packages.
|
|
|
|
// These are present when running `grunt build` after `grunt --dev`.
|
|
|
|
'!wp-admin/css/*-rtl.css',
|
|
|
|
'!wp-includes/css/*-rtl.css',
|
|
|
|
'!wp-admin/css/*.min.css',
|
|
|
|
'!wp-includes/css/*.min.css',
|
|
|
|
'!wp-includes/css/dist',
|
|
|
|
|
2015-02-27 21:18:05 +01:00
|
|
|
// Exceptions
|
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 12:35:18 +02:00
|
|
|
'!wp-includes/css/dashicons.css',
|
2015-10-31 05:37:41 +01:00
|
|
|
'!wp-includes/css/wp-embed-template.css',
|
|
|
|
'!wp-includes/css/wp-embed-template-ie.css'
|
2013-11-12 22:18:45 +01:00
|
|
|
]
|
|
|
|
},
|
2013-12-04 18:21:01 +01:00
|
|
|
colors: {
|
|
|
|
expand: true,
|
2018-12-24 14:28:22 +01:00
|
|
|
cwd: WORKING_DIR,
|
|
|
|
dest: WORKING_DIR,
|
2013-12-04 18:21:01 +01:00
|
|
|
ext: '-rtl.css',
|
|
|
|
src: [
|
2013-12-06 22:23:21 +01:00
|
|
|
'wp-admin/css/colors/*/colors.css'
|
2013-12-04 18:21:01 +01:00
|
|
|
]
|
|
|
|
},
|
2013-11-12 22:18:45 +01:00
|
|
|
dynamic: {
|
|
|
|
expand: true,
|
|
|
|
cwd: SOURCE_DIR,
|
2018-12-24 14:28:22 +01:00
|
|
|
dest: WORKING_DIR,
|
2013-11-12 22:18:45 +01:00
|
|
|
ext: '-rtl.css',
|
|
|
|
src: []
|
2013-08-07 07:25:25 +02:00
|
|
|
}
|
|
|
|
},
|
2013-10-27 22:53:11 +01:00
|
|
|
jshint: {
|
|
|
|
options: grunt.file.readJSON('.jshintrc'),
|
|
|
|
grunt: {
|
2013-11-07 22:14:49 +01:00
|
|
|
src: ['Gruntfile.js']
|
2013-10-27 22:53:11 +01:00
|
|
|
},
|
|
|
|
tests: {
|
2013-11-07 22:14:49 +01:00
|
|
|
src: [
|
|
|
|
'tests/qunit/**/*.js',
|
2014-03-29 11:05:22 +01:00
|
|
|
'!tests/qunit/vendor/*',
|
2014-02-10 02:11:25 +01:00
|
|
|
'!tests/qunit/editor/**'
|
2013-11-07 22:14:49 +01:00
|
|
|
],
|
2013-10-27 22:53:11 +01:00
|
|
|
options: grunt.file.readJSON('tests/qunit/.jshintrc')
|
|
|
|
},
|
2013-11-13 00:41:17 +01:00
|
|
|
themes: {
|
|
|
|
expand: true,
|
|
|
|
cwd: SOURCE_DIR + 'wp-content/themes',
|
|
|
|
src: [
|
2014-03-07 00:41:18 +01:00
|
|
|
'twenty*/**/*.js',
|
2013-11-13 00:41:17 +01:00
|
|
|
'!twenty{eleven,twelve,thirteen}/**',
|
|
|
|
// Third party scripts
|
2016-10-20 07:43:09 +02:00
|
|
|
'!twenty{fourteen,fifteen,sixteen}/js/html5.js',
|
|
|
|
'!twentyseventeen/assets/js/html5.js',
|
|
|
|
'!twentyseventeen/assets/js/jquery.scrollTo.js'
|
2013-11-13 00:41:17 +01:00
|
|
|
]
|
|
|
|
},
|
2015-02-09 17:00:44 +01:00
|
|
|
media: {
|
|
|
|
src: [
|
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 12:04:22 +02:00
|
|
|
SOURCE_DIR + 'js/media/**/*.js'
|
2015-02-09 17:00:44 +01:00
|
|
|
]
|
|
|
|
},
|
2013-11-07 22:14:49 +01:00
|
|
|
core: {
|
|
|
|
expand: true,
|
|
|
|
cwd: SOURCE_DIR,
|
|
|
|
src: [
|
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 12:04:22 +02:00
|
|
|
'js/_enqueues/**/*.js',
|
2013-11-07 22:14:49 +01:00
|
|
|
// Third party scripts
|
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 12:04:22 +02:00
|
|
|
'!js/_enqueues/vendor/**/*.js'
|
2013-11-07 22:14:49 +01:00
|
|
|
],
|
|
|
|
// Remove once other JSHint errors are resolved
|
|
|
|
options: {
|
|
|
|
curly: false,
|
|
|
|
eqeqeq: false
|
2013-11-08 01:40:38 +01:00
|
|
|
},
|
2014-04-30 23:39:43 +02:00
|
|
|
// Limit JSHint's run to a single specified file:
|
|
|
|
//
|
|
|
|
// grunt jshint:core --file=filename.js
|
|
|
|
//
|
|
|
|
// Optionally, include the file path:
|
|
|
|
//
|
|
|
|
// grunt jshint:core --file=path/to/filename.js
|
|
|
|
//
|
2013-11-08 01:40:38 +01:00
|
|
|
filter: function( filepath ) {
|
2013-11-14 19:16:59 +01:00
|
|
|
var index, file = grunt.option( 'file' );
|
2013-11-08 01:40:38 +01:00
|
|
|
|
|
|
|
// Don't filter when no target file is specified
|
|
|
|
if ( ! file ) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Normalize filepath for Windows
|
|
|
|
filepath = filepath.replace( /\\/g, '/' );
|
2013-11-14 19:16:59 +01:00
|
|
|
index = filepath.lastIndexOf( '/' + file );
|
2013-11-08 01:40:38 +01:00
|
|
|
|
|
|
|
// Match only the filename passed from cli
|
2013-11-14 19:16:59 +01:00
|
|
|
if ( filepath === file || ( -1 !== index && index === filepath.length - ( file.length + 1 ) ) ) {
|
2013-11-08 01:40:38 +01:00
|
|
|
return true;
|
2014-06-21 22:02:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
plugins: {
|
|
|
|
expand: true,
|
|
|
|
cwd: SOURCE_DIR + 'wp-content/plugins',
|
|
|
|
src: [
|
|
|
|
'**/*.js',
|
|
|
|
'!**/*.min.js'
|
|
|
|
],
|
2014-06-24 02:07:00 +02:00
|
|
|
// Limit JSHint's run to a single specified plugin directory:
|
2014-06-21 22:02:47 +02:00
|
|
|
//
|
2014-06-24 02:07:00 +02:00
|
|
|
// grunt jshint:plugins --dir=foldername
|
2014-06-21 22:02:47 +02:00
|
|
|
//
|
2014-06-24 02:07:00 +02:00
|
|
|
filter: function( dirpath ) {
|
|
|
|
var index, dir = grunt.option( 'dir' );
|
2014-06-21 22:02:47 +02:00
|
|
|
|
|
|
|
// Don't filter when no target folder is specified
|
2014-06-24 02:07:00 +02:00
|
|
|
if ( ! dir ) {
|
2014-06-21 22:02:47 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2014-06-24 02:07:00 +02:00
|
|
|
dirpath = dirpath.replace( /\\/g, '/' );
|
|
|
|
index = dirpath.lastIndexOf( '/' + dir );
|
2014-06-21 22:02:47 +02:00
|
|
|
|
|
|
|
// Match only the folder name passed from cli
|
|
|
|
if ( -1 !== index ) {
|
|
|
|
return true;
|
2013-11-08 01:40:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
2013-10-27 22:53:11 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2017-09-08 20:41:20 +02:00
|
|
|
jsdoc : {
|
|
|
|
dist : {
|
|
|
|
dest: 'jsdoc',
|
|
|
|
options: {
|
|
|
|
configure : 'jsdoc.conf.json'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2013-08-30 06:06:34 +02:00
|
|
|
qunit: {
|
2014-02-10 02:11:25 +01:00
|
|
|
files: [
|
|
|
|
'tests/qunit/**/*.html',
|
|
|
|
'!tests/qunit/editor/**'
|
|
|
|
]
|
2013-08-30 06:06:34 +02:00
|
|
|
},
|
2013-11-09 22:18:23 +01:00
|
|
|
phpunit: {
|
2013-11-09 22:25:02 +01:00
|
|
|
'default': {
|
2013-11-09 22:18:23 +01:00
|
|
|
cmd: 'phpunit',
|
2017-04-22 22:24:11 +02:00
|
|
|
args: ['--verbose', '-c', 'phpunit.xml.dist']
|
2013-11-09 22:18:23 +01:00
|
|
|
},
|
|
|
|
ajax: {
|
|
|
|
cmd: 'phpunit',
|
2017-04-22 22:24:11 +02:00
|
|
|
args: ['--verbose', '-c', 'phpunit.xml.dist', '--group', 'ajax']
|
2013-11-09 22:18:23 +01:00
|
|
|
},
|
|
|
|
multisite: {
|
|
|
|
cmd: 'phpunit',
|
2017-04-22 22:24:11 +02:00
|
|
|
args: ['--verbose', '-c', 'tests/phpunit/multisite.xml']
|
2014-11-10 15:48:28 +01:00
|
|
|
},
|
2017-10-02 00:15:16 +02:00
|
|
|
'ms-files': {
|
|
|
|
cmd: 'phpunit',
|
|
|
|
args: ['--verbose', '-c', 'tests/phpunit/multisite.xml', '--group', 'ms-files']
|
|
|
|
},
|
2014-11-10 15:48:28 +01:00
|
|
|
'external-http': {
|
|
|
|
cmd: 'phpunit',
|
2017-04-22 22:24:11 +02:00
|
|
|
args: ['--verbose', '-c', 'phpunit.xml.dist', '--group', 'external-http']
|
REST API: Add QUnit tests for wp-api.js and PHPUnit fixture generation.
Add QUnit tests: verify that wp-api loads correctly, verify that the expected base models and collections exist and can be instantiated, verify that collections contain the correct models, verify that expected helper functions are in place for each collection.
The QUnit tests rely on two fixture files: `tests/qunit/fixtures/wp-api-generated.js` contains the data response from each core endpoint and is generated by running the PHPUnit `restapi-jsclient` group. `tests/qunit/fixtures/wp-api.js` maps the generated data to endpoint routes, and overrides `Backbone.ajax` to mock the responses for the tests.
Add PHPUnit tests in `tests/phpunit/tests/rest-api/rest-schema-setup.php`. First, verify that the API returns the expected routes via `server->get_routes()`. Then, the `test_build_wp_api_client_fixtures` test goes thru each endpoint and requests it from the API, tests that it returns data, and builds up the data for the mocked QUnit tests, saving the final results to `tests/qunit/fixtures/wp-api-generated.js`.
Add a new grunt task `restapi-jsclient` which runs the phpunit side data generation and the qunit tests together.
Props jnylen0, welcher.
Fixes #39264.
git-svn-id: https://develop.svn.wordpress.org/trunk@40058 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-14 05:22:32 +01:00
|
|
|
},
|
|
|
|
'restapi-jsclient': {
|
|
|
|
cmd: 'phpunit',
|
2017-04-22 22:24:11 +02:00
|
|
|
args: ['--verbose', '-c', 'phpunit.xml.dist', '--group', 'restapi-jsclient']
|
2013-11-09 22:18:23 +01:00
|
|
|
}
|
|
|
|
},
|
2013-08-07 07:25:25 +02:00
|
|
|
uglify: {
|
2015-07-16 11:44:43 +02:00
|
|
|
options: {
|
2016-11-03 06:39:10 +01:00
|
|
|
ASCIIOnly: true,
|
|
|
|
screwIE8: false
|
2015-07-16 11:44:43 +02:00
|
|
|
},
|
2013-08-07 07:25:25 +02:00
|
|
|
core: {
|
|
|
|
expand: true,
|
2018-12-24 14:28:22 +01:00
|
|
|
cwd: WORKING_DIR,
|
|
|
|
dest: WORKING_DIR,
|
2013-08-07 07:25:25 +02:00
|
|
|
ext: '.min.js',
|
|
|
|
src: [
|
2017-05-11 20:54:24 +02:00
|
|
|
'wp-admin/js/**/*.js',
|
2013-08-07 07:25:25 +02:00
|
|
|
'wp-includes/js/*.js',
|
2017-09-22 22:09:49 +02:00
|
|
|
'wp-includes/js/plupload/*.js',
|
2016-02-29 21:42:10 +01:00
|
|
|
'wp-includes/js/mediaelement/wp-mediaelement.js',
|
|
|
|
'wp-includes/js/mediaelement/wp-playlist.js',
|
2017-10-18 04:25:06 +02:00
|
|
|
'wp-includes/js/mediaelement/mediaelement-migrate.js',
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
git-svn-id: https://develop.svn.wordpress.org/trunk@26876 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-29 00:52:04 +01:00
|
|
|
'wp-includes/js/tinymce/plugins/wordpress/plugin.js',
|
|
|
|
'wp-includes/js/tinymce/plugins/wp*/plugin.js',
|
|
|
|
|
2013-08-07 07:25:25 +02:00
|
|
|
// Exceptions
|
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 12:04:22 +02:00
|
|
|
'!**/*.min.js',
|
2013-08-07 07:25:25 +02:00
|
|
|
'!wp-admin/js/custom-header.js', // Why? We should minify this.
|
|
|
|
'!wp-admin/js/farbtastic.js',
|
|
|
|
'!wp-includes/js/swfobject.js',
|
2018-12-20 22:02:16 +01:00
|
|
|
'!wp-includes/js/wp-embed.js' // We have extra options for this, see uglify:embed
|
2013-08-07 07:25:25 +02:00
|
|
|
]
|
2014-10-07 17:27:56 +02:00
|
|
|
},
|
2015-11-20 00:05:39 +01:00
|
|
|
embed: {
|
|
|
|
options: {
|
|
|
|
compress: {
|
|
|
|
conditionals: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
expand: true,
|
2018-12-24 14:28:22 +01:00
|
|
|
cwd: WORKING_DIR,
|
|
|
|
dest: WORKING_DIR,
|
2015-11-20 00:05:39 +01:00
|
|
|
ext: '.min.js',
|
|
|
|
src: ['wp-includes/js/wp-embed.js']
|
|
|
|
},
|
2014-10-07 17:27:56 +02:00
|
|
|
jqueryui: {
|
|
|
|
options: {
|
2015-11-07 13:36:24 +01:00
|
|
|
// Preserve comments that start with a bang.
|
|
|
|
preserveComments: /^!/
|
2014-10-07 17:27:56 +02:00
|
|
|
},
|
|
|
|
expand: true,
|
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 12:04:22 +02:00
|
|
|
cwd: 'node_modules/jquery-ui/ui/',
|
2018-12-24 14:28:22 +01:00
|
|
|
dest: WORKING_DIR + 'wp-includes/js/jquery/ui/',
|
2014-10-07 17:27:56 +02:00
|
|
|
ext: '.min.js',
|
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 12:04:22 +02:00
|
|
|
src: ['*.js']
|
2018-04-03 21:45:39 +02:00
|
|
|
},
|
|
|
|
imgareaselect: {
|
2018-12-24 14:28:22 +01:00
|
|
|
src: WORKING_DIR + 'wp-includes/js/imgareaselect/jquery.imgareaselect.js',
|
|
|
|
dest: WORKING_DIR + 'wp-includes/js/imgareaselect/jquery.imgareaselect.min.js'
|
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 12:04:22 +02:00
|
|
|
},
|
2019-02-14 01:06:39 +01:00
|
|
|
jqueryform: {
|
|
|
|
src: WORKING_DIR + 'wp-includes/js/jquery/jquery.form.js',
|
|
|
|
dest: WORKING_DIR + 'wp-includes/js/jquery/jquery.form.min.js'
|
|
|
|
},
|
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 12:04:22 +02:00
|
|
|
dynamic: {
|
|
|
|
expand: true,
|
2018-12-24 14:28:22 +01:00
|
|
|
cwd: WORKING_DIR,
|
|
|
|
dest: WORKING_DIR,
|
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 12:04:22 +02:00
|
|
|
ext: '.min.js',
|
|
|
|
src: []
|
2013-08-07 07:25:25 +02:00
|
|
|
}
|
|
|
|
},
|
2017-10-04 23:00:15 +02:00
|
|
|
webpack: {
|
2018-12-24 14:28:22 +01:00
|
|
|
prod: webpackConfig( { environment: 'production', buildTarget: WORKING_DIR } ),
|
|
|
|
dev: webpackConfig( { environment: 'development', buildTarget: WORKING_DIR } ),
|
2018-12-13 16:25:37 +01:00
|
|
|
watch: webpackConfig( { environment: 'development', watch: true } )
|
2017-10-04 23:00:15 +02:00
|
|
|
},
|
2013-08-31 00:16:43 +02:00
|
|
|
concat: {
|
|
|
|
tinymce: {
|
|
|
|
options: {
|
|
|
|
separator: '\n',
|
|
|
|
process: function( src, filepath ) {
|
2018-12-24 14:28:22 +01:00
|
|
|
return '// Source: ' + filepath.replace( WORKING_DIR, '' ) + '\n' + src;
|
2013-08-31 00:16:43 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
src: [
|
2018-12-24 14:28:22 +01:00
|
|
|
WORKING_DIR + 'wp-includes/js/tinymce/tinymce.min.js',
|
|
|
|
WORKING_DIR + 'wp-includes/js/tinymce/themes/modern/theme.min.js',
|
|
|
|
WORKING_DIR + 'wp-includes/js/tinymce/plugins/*/plugin.min.js'
|
2013-08-31 00:16:43 +02:00
|
|
|
],
|
2018-12-24 14:28:22 +01:00
|
|
|
dest: WORKING_DIR + 'wp-includes/js/tinymce/wp-tinymce.js'
|
2015-03-25 00:32:23 +01:00
|
|
|
},
|
|
|
|
emoji: {
|
|
|
|
options: {
|
|
|
|
separator: '\n',
|
|
|
|
process: function( src, filepath ) {
|
2018-12-24 14:28:22 +01:00
|
|
|
return '// Source: ' + filepath.replace( WORKING_DIR, '' ) + '\n' + src;
|
2015-03-25 00:32:23 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
src: [
|
2018-12-24 14:28:22 +01:00
|
|
|
WORKING_DIR + 'wp-includes/js/twemoji.min.js',
|
|
|
|
WORKING_DIR + 'wp-includes/js/wp-emoji.min.js'
|
2015-03-25 00:32:23 +01:00
|
|
|
],
|
2018-12-24 14:28:22 +01:00
|
|
|
dest: WORKING_DIR + 'wp-includes/js/wp-emoji-release.min.js'
|
2013-08-31 00:16:43 +02:00
|
|
|
}
|
|
|
|
},
|
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 12:04:22 +02:00
|
|
|
patch:{
|
|
|
|
options: {
|
|
|
|
file_mappings: {
|
|
|
|
'src/wp-admin/js/accordion.js': 'src/js/_enqueues/lib/accordion.js',
|
|
|
|
'src/wp-admin/js/code-editor.js': 'src/js/_enqueues/wp/code-editor.js',
|
|
|
|
'src/wp-admin/js/color-picker.js': 'src/js/_enqueues/lib/color-picker.js',
|
|
|
|
'src/wp-admin/js/comment.js': 'src/js/_enqueues/admin/comment.js',
|
|
|
|
'src/wp-admin/js/common.js': 'src/js/_enqueues/admin/common.js',
|
|
|
|
'src/wp-admin/js/custom-background.js': 'src/js/_enqueues/admin/custom-background.js',
|
|
|
|
'src/wp-admin/js/custom-header.js': 'src/js/_enqueues/admin/custom-header.js',
|
|
|
|
'src/wp-admin/js/customize-controls.js': 'src/js/_enqueues/wp/customize/controls.js',
|
|
|
|
'src/wp-admin/js/customize-nav-menus.js': 'src/js/_enqueues/wp/customize/nav-menus.js',
|
|
|
|
'src/wp-admin/js/customize-widgets.js': 'src/js/_enqueues/wp/customize/widgets.js',
|
|
|
|
'src/wp-admin/js/dashboard.js': 'src/js/_enqueues/wp/dashboard.js',
|
|
|
|
'src/wp-admin/js/edit-comments.js': 'src/js/_enqueues/admin/edit-comments.js',
|
|
|
|
'src/wp-admin/js/editor-expand.js': 'src/js/_enqueues/wp/editor/dfw.js',
|
|
|
|
'src/wp-admin/js/editor.js': 'src/js/_enqueues/wp/editor/base.js',
|
|
|
|
'src/wp-admin/js/gallery.js': 'src/js/_enqueues/lib/gallery.js',
|
|
|
|
'src/wp-admin/js/image-edit.js': 'src/js/_enqueues/lib/image-edit.js',
|
|
|
|
'src/wp-admin/js/inline-edit-post.js': 'src/js/_enqueues/admin/inline-edit-post.js',
|
|
|
|
'src/wp-admin/js/inline-edit-tax.js': 'src/js/_enqueues/admin/inline-edit-tax.js',
|
|
|
|
'src/wp-admin/js/language-chooser.js': 'src/js/_enqueues/lib/language-chooser.js',
|
|
|
|
'src/wp-admin/js/link.js': 'src/js/_enqueues/admin/link.js',
|
|
|
|
'src/wp-admin/js/media-gallery.js': 'src/js/_enqueues/deprecated/media-gallery.js',
|
|
|
|
'src/wp-admin/js/media-upload.js': 'src/js/_enqueues/admin/media-upload.js',
|
|
|
|
'src/wp-admin/js/media.js': 'src/js/_enqueues/admin/media.js',
|
|
|
|
'src/wp-admin/js/nav-menu.js': 'src/js/_enqueues/lib/nav-menu.js',
|
|
|
|
'src/wp-admin/js/password-strength-meter.js': 'src/js/_enqueues/wp/password-strength-meter.js',
|
|
|
|
'src/wp-admin/js/plugin-install.js': 'src/js/_enqueues/admin/plugin-install.js',
|
|
|
|
'src/wp-admin/js/post.js': 'src/js/_enqueues/admin/post.js',
|
|
|
|
'src/wp-admin/js/postbox.js': 'src/js/_enqueues/admin/postbox.js',
|
|
|
|
'src/wp-admin/js/revisions.js': 'src/js/_enqueues/wp/revisions.js',
|
|
|
|
'src/wp-admin/js/set-post-thumbnail.js': 'src/js/_enqueues/admin/set-post-thumbnail.js',
|
|
|
|
'src/wp-admin/js/svg-painter.js': 'src/js/_enqueues/wp/svg-painter.js',
|
|
|
|
'src/wp-admin/js/tags-box.js': 'src/js/_enqueues/admin/tags-box.js',
|
|
|
|
'src/wp-admin/js/tags-suggest.js': 'src/js/_enqueues/admin/tags-suggest.js',
|
|
|
|
'src/wp-admin/js/tags.js': 'src/js/_enqueues/admin/tags.js',
|
|
|
|
'src/wp-admin/js/theme-plugin-editor.js': 'src/js/_enqueues/wp/theme-plugin-editor.js',
|
|
|
|
'src/wp-admin/js/theme.js': 'src/js/_enqueues/wp/theme.js',
|
|
|
|
'src/wp-admin/js/updates.js': 'src/js/_enqueues/wp/updates.js',
|
|
|
|
'src/wp-admin/js/user-profile.js': 'src/js/_enqueues/admin/user-profile.js',
|
|
|
|
'src/wp-admin/js/user-suggest.js': 'src/js/_enqueues/lib/user-suggest.js',
|
|
|
|
'src/wp-admin/js/widgets/custom-html-widgets.js': 'src/js/_enqueues/wp/widgets/custom-html.js',
|
|
|
|
'src/wp-admin/js/widgets/media-audio-widget.js': 'src/js/_enqueues/wp/widgets/media-audio.js',
|
|
|
|
'src/wp-admin/js/widgets/media-gallery-widget.js': 'src/js/_enqueues/wp/widgets/media-gallery.js',
|
|
|
|
'src/wp-admin/js/widgets/media-image-widget.js': 'src/js/_enqueues/wp/widgets/media-image.js',
|
|
|
|
'src/wp-admin/js/widgets/media-video-widget.js': 'src/js/_enqueues/wp/widgets/media-video.js',
|
|
|
|
'src/wp-admin/js/widgets/media-widgets.js': 'src/js/_enqueues/wp/widgets/media.js',
|
|
|
|
'src/wp-admin/js/widgets/text-widgets.js': 'src/js/_enqueues/wp/widgets/text.js',
|
|
|
|
'src/wp-admin/js/widgets.js': 'src/js/_enqueues/admin/widgets.js',
|
|
|
|
'src/wp-admin/js/word-count.js': 'src/js/_enqueues/wp/utils/word-count.js',
|
|
|
|
'src/wp-admin/js/wp-fullscreen-stub.js': 'src/js/_enqueues/deprecated/fullscreen-stub.js',
|
|
|
|
'src/wp-admin/js/xfn.js': 'src/js/_enqueues/admin/xfn.js',
|
|
|
|
'src/wp-includes/js/admin-bar.js': 'src/js/_enqueues/lib/admin-bar.js',
|
|
|
|
'src/wp-includes/js/api-request.js': 'src/js/_enqueues/wp/api-request.js',
|
|
|
|
'src/wp-includes/js/autosave.js': 'src/js/_enqueues/wp/autosave.js',
|
|
|
|
'src/wp-includes/js/comment-reply.js': 'src/js/_enqueues/lib/comment-reply.js',
|
|
|
|
'src/wp-includes/js/customize-base.js': 'src/js/_enqueues/wp/customize/base.js',
|
|
|
|
'src/wp-includes/js/customize-loader.js': 'src/js/_enqueues/wp/customize/loader.js',
|
|
|
|
'src/wp-includes/js/customize-models.js': 'src/js/_enqueues/wp/customize/models.js',
|
|
|
|
'src/wp-includes/js/customize-preview-nav-menus.js': 'src/js/_enqueues/wp/customize/preview-nav-menus.js',
|
|
|
|
'src/wp-includes/js/customize-preview-widgets.js': 'src/js/_enqueues/wp/customize/preview-widgets.js',
|
|
|
|
'src/wp-includes/js/customize-preview.js': 'src/js/_enqueues/wp/customize/preview.js',
|
|
|
|
'src/wp-includes/js/customize-selective-refresh.js': 'src/js/_enqueues/wp/customize/selective-refresh.js',
|
|
|
|
'src/wp-includes/js/customize-views.js': 'src/js/_enqueues/wp/customize/views.js',
|
|
|
|
'src/wp-includes/js/heartbeat.js': 'src/js/_enqueues/wp/heartbeat.js',
|
|
|
|
'src/wp-includes/js/mce-view.js': 'src/js/_enqueues/wp/mce-view.js',
|
|
|
|
'src/wp-includes/js/media-editor.js': 'src/js/_enqueues/wp/media/editor.js',
|
|
|
|
'src/wp-includes/js/quicktags.js': 'src/js/_enqueues/lib/quicktags.js',
|
|
|
|
'src/wp-includes/js/shortcode.js': 'src/js/_enqueues/wp/shortcode.js',
|
|
|
|
'src/wp-includes/js/utils.js': 'src/js/_enqueues/lib/cookies.js',
|
|
|
|
'src/wp-includes/js/wp-a11y.js': 'src/js/_enqueues/wp/a11y.js',
|
|
|
|
'src/wp-includes/js/wp-ajax-response.js': 'src/js/_enqueues/lib/ajax-response.js',
|
|
|
|
'src/wp-includes/js/wp-api.js': 'src/js/_enqueues/wp/api.js',
|
|
|
|
'src/wp-includes/js/wp-auth-check.js': 'src/js/_enqueues/lib/auth-check.js',
|
|
|
|
'src/wp-includes/js/wp-backbone.js': 'src/js/_enqueues/wp/backbone.js',
|
|
|
|
'src/wp-includes/js/wp-custom-header.js': 'src/js/_enqueues/wp/custom-header.js',
|
|
|
|
'src/wp-includes/js/wp-embed-template.js': 'src/js/_enqueues/lib/embed-template.js',
|
|
|
|
'src/wp-includes/js/wp-embed.js': 'src/js/_enqueues/wp/embed.js',
|
|
|
|
'src/wp-includes/js/wp-emoji-loader.js': 'src/js/_enqueues/lib/emoji-loader.js',
|
|
|
|
'src/wp-includes/js/wp-emoji.js': 'src/js/_enqueues/wp/emoji.js',
|
|
|
|
'src/wp-includes/js/wp-list-revisions.js': 'src/js/_enqueues/lib/list-revisions.js',
|
|
|
|
'src/wp-includes/js/wp-lists.js': 'src/js/_enqueues/lib/lists.js',
|
|
|
|
'src/wp-includes/js/wp-pointer.js': 'src/js/_enqueues/lib/pointer.js',
|
|
|
|
'src/wp-includes/js/wp-sanitize.js': 'src/js/_enqueues/wp/sanitize.js',
|
|
|
|
'src/wp-includes/js/wp-util.js': 'src/js/_enqueues/wp/util.js',
|
|
|
|
'src/wp-includes/js/wpdialog.js': 'src/js/_enqueues/lib/dialog.js',
|
|
|
|
'src/wp-includes/js/wplink.js': 'src/js/_enqueues/lib/link.js',
|
|
|
|
'src/wp-includes/js/zxcvbn-async.js': 'src/js/_enqueues/lib/zxcvbn-async.js',
|
|
|
|
'src/wp-includes/js/media/controllers/audio-details.js' : 'src/js/media/controllers/audio-details.js',
|
|
|
|
'src/wp-includes/js/media/controllers/collection-add.js' : 'src/js/media/controllers/collection-add.js',
|
|
|
|
'src/wp-includes/js/media/controllers/collection-edit.js' : 'src/js/media/controllers/collection-edit.js',
|
|
|
|
'src/wp-includes/js/media/controllers/cropper.js' : 'src/js/media/controllers/cropper.js',
|
|
|
|
'src/wp-includes/js/media/controllers/customize-image-cropper.js' : 'src/js/media/controllers/customize-image-cropper.js',
|
|
|
|
'src/wp-includes/js/media/controllers/edit-attachment-metadata.js' : 'src/js/media/controllers/edit-attachment-metadata.js',
|
|
|
|
'src/wp-includes/js/media/controllers/edit-image.js' : 'src/js/media/controllers/edit-image.js',
|
|
|
|
'src/wp-includes/js/media/controllers/embed.js' : 'src/js/media/controllers/embed.js',
|
|
|
|
'src/wp-includes/js/media/controllers/featured-image.js' : 'src/js/media/controllers/featured-image.js',
|
|
|
|
'src/wp-includes/js/media/controllers/gallery-add.js' : 'src/js/media/controllers/gallery-add.js',
|
|
|
|
'src/wp-includes/js/media/controllers/gallery-edit.js' : 'src/js/media/controllers/gallery-edit.js',
|
|
|
|
'src/wp-includes/js/media/controllers/image-details.js' : 'src/js/media/controllers/image-details.js',
|
|
|
|
'src/wp-includes/js/media/controllers/library.js' : 'src/js/media/controllers/library.js',
|
|
|
|
'src/wp-includes/js/media/controllers/media-library.js' : 'src/js/media/controllers/media-library.js',
|
|
|
|
'src/wp-includes/js/media/controllers/region.js' : 'src/js/media/controllers/region.js',
|
|
|
|
'src/wp-includes/js/media/controllers/replace-image.js' : 'src/js/media/controllers/replace-image.js',
|
|
|
|
'src/wp-includes/js/media/controllers/site-icon-cropper.js' : 'src/js/media/controllers/site-icon-cropper.js',
|
|
|
|
'src/wp-includes/js/media/controllers/state-machine.js' : 'src/js/media/controllers/state-machine.js',
|
|
|
|
'src/wp-includes/js/media/controllers/state.js' : 'src/js/media/controllers/state.js',
|
|
|
|
'src/wp-includes/js/media/controllers/video-details.js' : 'src/js/media/controllers/video-details.js',
|
|
|
|
'src/wp-includes/js/media/models/attachment.js' : 'src/js/media/models/attachment.js',
|
|
|
|
'src/wp-includes/js/media/models/attachments.js' : 'src/js/media/models/attachments.js',
|
|
|
|
'src/wp-includes/js/media/models/post-image.js' : 'src/js/media/models/post-image.js',
|
|
|
|
'src/wp-includes/js/media/models/post-media.js' : 'src/js/media/models/post-media.js',
|
|
|
|
'src/wp-includes/js/media/models/query.js' : 'src/js/media/models/query.js',
|
|
|
|
'src/wp-includes/js/media/models/selection.js' : 'src/js/media/models/selection.js',
|
|
|
|
'src/wp-includes/js/media/routers/manage.js' : 'src/js/media/routers/manage.js',
|
|
|
|
'src/wp-includes/js/media/utils/selection-sync.js' : 'src/js/media/utils/selection-sync.js',
|
|
|
|
'src/wp-includes/js/media/views/attachment-compat.js' : 'src/js/media/views/attachment-compat.js',
|
|
|
|
'src/wp-includes/js/media/views/attachment-filters.js' : 'src/js/media/views/attachment-filters.js',
|
|
|
|
'src/wp-includes/js/media/views/attachment-filters/all.js' : 'src/js/media/views/attachment-filters/all.js',
|
|
|
|
'src/wp-includes/js/media/views/attachment-filters/date.js' : 'src/js/media/views/attachment-filters/date.js',
|
|
|
|
'src/wp-includes/js/media/views/attachment-filters/uploaded.js' : 'src/js/media/views/attachment-filters/uploaded.js',
|
|
|
|
'src/wp-includes/js/media/views/attachment.js' : 'src/js/media/views/attachment.js',
|
|
|
|
'src/wp-includes/js/media/views/attachment/details-two-column.js' : 'src/js/media/views/details-two-column.js',
|
|
|
|
'src/wp-includes/js/media/views/attachment/details.js' : 'src/js/media/views/details.js',
|
|
|
|
'src/wp-includes/js/media/views/attachment/edit-library.js' : 'src/js/media/views/edit-library.js',
|
|
|
|
'src/wp-includes/js/media/views/attachment/edit-selection.js' : 'src/js/media/views/edit-selection.js',
|
|
|
|
'src/wp-includes/js/media/views/attachment/library.js' : 'src/js/media/views/library.js',
|
|
|
|
'src/wp-includes/js/media/views/attachment/selection.js' : 'src/js/media/views/selection.js',
|
|
|
|
'src/wp-includes/js/media/views/attachment/attachments.js' : 'src/js/media/views/attachments.js',
|
|
|
|
'src/wp-includes/js/media/views/attachments/browser.js' : 'src/js/media/views/attachments/browser.js',
|
|
|
|
'src/wp-includes/js/media/views/attachments/selection.js' : 'src/js/media/views/attachments/selection.js',
|
|
|
|
'src/wp-includes/js/media/views/attachments/audio-details.js' : 'src/js/media/views/attachments/audio-details.js',
|
|
|
|
'src/wp-includes/js/media/views/attachments/button-group.js' : 'src/js/media/views/attachments/button-group.js',
|
|
|
|
'src/wp-includes/js/media/views/attachments/button.js' : 'src/js/media/views/attachments/button.js',
|
|
|
|
'src/wp-includes/js/media/views/button/delete-selected-permanently.js' : 'src/js/media/views/button/delete-selected-permanently.js',
|
|
|
|
'src/wp-includes/js/media/views/button/delete-selected.js' : 'src/js/media/views/button/delete-selected.js',
|
|
|
|
'src/wp-includes/js/media/views/button/select-mode-toggle.js' : 'src/js/media/views/button/select-mode-toggle.js',
|
|
|
|
'src/wp-includes/js/media/views/cropper.js' : 'src/js/media/views/cropper.js',
|
|
|
|
'src/wp-includes/js/media/views/edit-image-details.js' : 'src/js/media/views/edit-image-details.js',
|
|
|
|
'src/wp-includes/js/media/views/edit-image.js' : 'src/js/media/views/edit-image.js',
|
|
|
|
'src/wp-includes/js/media/views/embed.js' : 'src/js/media/views/embed.js',
|
|
|
|
'src/wp-includes/js/media/views/embed/image.js' : 'src/js/media/views/embed/image.js',
|
|
|
|
'src/wp-includes/js/media/views/embed/link.js' : 'src/js/media/views/embed/link.js',
|
|
|
|
'src/wp-includes/js/media/views/embed/url.js' : 'src/js/media/views/embed/url.js',
|
|
|
|
'src/wp-includes/js/media/views/focus-manager.js' : 'src/js/media/views/focus-manager.js',
|
|
|
|
'src/wp-includes/js/media/views/frame.js' : 'src/js/media/views/frame.js',
|
|
|
|
'src/wp-includes/js/media/views/frame/audio-details.js' : 'src/js/media/views/frame/audio-details.js',
|
|
|
|
'src/wp-includes/js/media/views/frame/edit-attachments.js' : 'src/js/media/views/frame/edit-attachments.js',
|
|
|
|
'src/wp-includes/js/media/views/frame/image-details.js' : 'src/js/media/views/frame/image-details.js',
|
|
|
|
'src/wp-includes/js/media/views/frame/manage.js' : 'src/js/media/views/frame/manage.js',
|
|
|
|
'src/wp-includes/js/media/views/frame/media-details.js' : 'src/js/media/views/frame/media-details.js',
|
|
|
|
'src/wp-includes/js/media/views/frame/post.js' : 'src/js/media/views/frame/post.js',
|
|
|
|
'src/wp-includes/js/media/views/frame/select.js' : 'src/js/media/views/frame/select.js',
|
|
|
|
'src/wp-includes/js/media/views/frame/video-details.js' : 'src/js/media/views/frame/video-details.js',
|
|
|
|
'src/wp-includes/js/media/views/iframe.js' : 'src/js/media/views/iframe.js',
|
|
|
|
'src/wp-includes/js/media/views/image-details.js' : 'src/js/media/views/image-details.js',
|
|
|
|
'src/wp-includes/js/media/views/label.js' : 'src/js/media/views/label.js',
|
|
|
|
'src/wp-includes/js/media/views/media-details.js' : 'src/js/media/views/media-details.js',
|
|
|
|
'src/wp-includes/js/media/views/media-frame.js' : 'src/js/media/views/media-frame.js',
|
|
|
|
'src/wp-includes/js/media/views/menu-item.js' : 'src/js/media/views/menu-item.js',
|
|
|
|
'src/wp-includes/js/media/views/menu.js' : 'src/js/media/views/menu.js',
|
|
|
|
'src/wp-includes/js/media/views/modal.js' : 'src/js/media/views/modal.js',
|
|
|
|
'src/wp-includes/js/media/views/priority-list.js' : 'src/js/media/views/priority-list.js',
|
|
|
|
'src/wp-includes/js/media/views/router-item.js' : 'src/js/media/views/router-item.js',
|
|
|
|
'src/wp-includes/js/media/views/router.js' : 'src/js/media/views/router.js',
|
|
|
|
'src/wp-includes/js/media/views/search.js' : 'src/js/media/views/search.js',
|
|
|
|
'src/wp-includes/js/media/views/selection.js' : 'src/js/media/views/selection.js',
|
|
|
|
'src/wp-includes/js/media/views/settings.js' : 'src/js/media/views/settings.js',
|
|
|
|
'src/wp-includes/js/media/views/settings/attachment-display.js' : 'src/js/media/views/settings/attachment-display.js',
|
|
|
|
'src/wp-includes/js/media/views/settings/gallery.js' : 'src/js/media/views/settings/gallery.js',
|
|
|
|
'src/wp-includes/js/media/views/settings/playlist.js' : 'src/js/media/views/settings/playlist.js',
|
|
|
|
'src/wp-includes/js/media/views/sidebar.js' : 'src/js/media/views/sidebar.js',
|
|
|
|
'src/wp-includes/js/media/views/site-icon-cropper.js' : 'src/js/media/views/site-icon-cropper.js',
|
|
|
|
'src/wp-includes/js/media/views/site-icon-preview.js' : 'src/js/media/views/site-icon-preview.js',
|
|
|
|
'src/wp-includes/js/media/views/spinner.js' : 'src/js/media/views/spinner.js',
|
|
|
|
'src/wp-includes/js/media/views/toolbar.js' : 'src/js/media/views/toolbar.js',
|
|
|
|
'src/wp-includes/js/media/views/toolbar/embed.js' : 'src/js/media/views/toolbar/embed.js',
|
|
|
|
'src/wp-includes/js/media/views/toolbar/select.js' : 'src/js/media/views/toolbar/select.js',
|
|
|
|
'src/wp-includes/js/media/views/uploader/editor.js' : 'src/js/media/views/uploader/editor.js',
|
|
|
|
'src/wp-includes/js/media/views/uploader/inline.js' : 'src/js/media/views/uploader/inline.js',
|
|
|
|
'src/wp-includes/js/media/views/uploader/status-error.js' : 'src/js/media/views/uploader/status-error.js',
|
|
|
|
'src/wp-includes/js/media/views/uploader/status.js' : 'src/js/media/views/uploader/status.js',
|
|
|
|
'src/wp-includes/js/media/views/uploader/window.js' : 'src/js/media/views/uploader/window.js',
|
|
|
|
'src/wp-includes/js/media/views/video-details.js' : 'src/js/media/views/video-details.js',
|
|
|
|
'src/wp-includes/js/media/views/view.js' : 'src/js/media/views/view.js'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2014-01-17 19:14:15 +01:00
|
|
|
jsvalidate:{
|
2014-02-13 09:00:47 +01:00
|
|
|
options: {
|
2014-01-17 19:14:15 +01:00
|
|
|
globals: {},
|
|
|
|
esprimaOptions:{},
|
|
|
|
verbose: false
|
|
|
|
},
|
|
|
|
build: {
|
|
|
|
files: {
|
2014-01-29 05:44:31 +01:00
|
|
|
src: [
|
2018-12-24 14:28:22 +01:00
|
|
|
WORKING_DIR + 'wp-{admin,includes}/**/*.js',
|
|
|
|
WORKING_DIR + 'wp-content/themes/twenty*/**/*.js',
|
2019-03-28 22:16:48 +01:00
|
|
|
'!' + WORKING_DIR + 'wp-content/themes/twenty*/node_modules/**/*.js',
|
2018-12-24 14:28:22 +01:00
|
|
|
'!' + WORKING_DIR + 'wp-includes/js/dist/vendor/*.js',
|
2014-01-29 05:44:31 +01:00
|
|
|
]
|
2014-01-17 19:14:15 +01:00
|
|
|
}
|
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 12:04:22 +02:00
|
|
|
},
|
|
|
|
dynamic: {
|
|
|
|
files: {
|
|
|
|
src: []
|
|
|
|
}
|
2014-01-29 05:44:31 +01:00
|
|
|
}
|
2014-01-17 19:14:15 +01:00
|
|
|
},
|
2014-02-13 09:00:47 +01:00
|
|
|
imagemin: {
|
|
|
|
core: {
|
|
|
|
expand: true,
|
|
|
|
cwd: SOURCE_DIR,
|
|
|
|
src: [
|
|
|
|
'wp-{admin,includes}/images/**/*.{png,jpg,gif,jpeg}',
|
|
|
|
'wp-includes/js/tinymce/skins/wordpress/images/*.{png,jpg,gif,jpeg}'
|
|
|
|
],
|
|
|
|
dest: SOURCE_DIR
|
|
|
|
}
|
|
|
|
},
|
2015-03-25 00:32:23 +01:00
|
|
|
includes: {
|
|
|
|
emoji: {
|
|
|
|
src: BUILD_DIR + 'wp-includes/formatting.php',
|
|
|
|
dest: '.'
|
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 12:35:18 +02:00
|
|
|
},
|
2015-10-17 03:20:19 +02:00
|
|
|
embed: {
|
2015-11-20 16:36:21 +01:00
|
|
|
src: BUILD_DIR + 'wp-includes/embed.php',
|
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 12:35:18 +02:00
|
|
|
dest: '.'
|
2015-03-25 00:32:23 +01:00
|
|
|
}
|
|
|
|
},
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
replace: {
|
|
|
|
emojiRegex: {
|
|
|
|
options: {
|
|
|
|
patterns: [
|
|
|
|
{
|
2017-10-03 09:11:28 +02:00
|
|
|
match: /\/\/ START: emoji arrays[\S\s]*\/\/ END: emoji arrays/g,
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
replacement: function () {
|
2017-10-03 09:11:28 +02:00
|
|
|
var regex, files,
|
|
|
|
partials, partialsSet,
|
|
|
|
entities, emojiArray;
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
|
2017-10-03 09:11:28 +02:00
|
|
|
grunt.log.writeln( 'Fetching list of Twemoji files...' );
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
|
2017-10-03 09:11:28 +02:00
|
|
|
// Fetch a list of the files that Twemoji supplies
|
|
|
|
files = spawn( 'svn', [ 'ls', 'https://github.com/twitter/twemoji.git/branches/gh-pages/2/assets' ] );
|
|
|
|
if ( 0 !== files.status ) {
|
|
|
|
grunt.fatal( 'Unable to fetch Twemoji file list' );
|
|
|
|
}
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
|
2017-10-03 09:11:28 +02:00
|
|
|
entities = files.stdout.toString();
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
|
2017-10-03 09:11:28 +02:00
|
|
|
// Tidy up the file list
|
|
|
|
entities = entities.replace( /\.ai/g, '' );
|
|
|
|
entities = entities.replace( /^$/g, '' );
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
|
2017-10-03 09:11:28 +02:00
|
|
|
// Convert the emoji entities to HTML entities
|
|
|
|
partials = entities = entities.replace( /([a-z0-9]+)/g, '&#x$1;' );
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
|
2017-10-03 09:11:28 +02:00
|
|
|
// Remove the hyphens between the HTML entities
|
|
|
|
entities = entities.replace( /-/g, '' );
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
|
2017-10-03 09:11:28 +02:00
|
|
|
// Sort the entities list by length, so the longest emoji will be found first
|
|
|
|
emojiArray = entities.split( '\n' ).sort( function ( a, b ) {
|
|
|
|
return b.length - a.length;
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
} );
|
|
|
|
|
2017-10-03 09:11:28 +02:00
|
|
|
// Convert the entities list to PHP array syntax
|
|
|
|
entities = '\'' + emojiArray.filter( function( val ) {
|
|
|
|
return val.length >= 8 ? val : false ;
|
2018-01-25 02:05:01 +01:00
|
|
|
} ).join( '\', \'' ) + '\'';
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
|
2017-10-03 09:11:28 +02:00
|
|
|
// Create a list of all characters used by the emoji list
|
|
|
|
partials = partials.replace( /-/g, '\n' );
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
|
2017-10-03 09:11:28 +02:00
|
|
|
// Set automatically removes duplicates
|
|
|
|
partialsSet = new Set( partials.split( '\n' ) );
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
|
2017-10-03 09:11:28 +02:00
|
|
|
// Convert the partials list to PHP array syntax
|
|
|
|
partials = '\'' + Array.from( partialsSet ).filter( function( val ) {
|
|
|
|
return val.length >= 8 ? val : false ;
|
2018-01-25 02:05:01 +01:00
|
|
|
} ).join( '\', \'' ) + '\'';
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
|
2017-10-03 09:11:28 +02:00
|
|
|
regex = '// START: emoji arrays\n';
|
2018-01-25 02:05:01 +01:00
|
|
|
regex += '\t$entities = array( ' + entities + ' );\n';
|
|
|
|
regex += '\t$partials = array( ' + partials + ' );\n';
|
2017-10-03 09:11:28 +02:00
|
|
|
regex += '\t// END: emoji arrays';
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
|
|
|
|
return regex;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
files: [
|
|
|
|
{
|
|
|
|
expand: true,
|
|
|
|
flatten: true,
|
|
|
|
src: [
|
|
|
|
SOURCE_DIR + 'wp-includes/formatting.php'
|
|
|
|
],
|
|
|
|
dest: SOURCE_DIR + 'wp-includes/'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2015-03-05 20:48:59 +01:00
|
|
|
_watch: {
|
2018-05-27 20:46:15 +02:00
|
|
|
options: {
|
|
|
|
interval: 2000
|
|
|
|
},
|
2013-08-07 07:25:25 +02:00
|
|
|
all: {
|
|
|
|
files: [
|
|
|
|
SOURCE_DIR + '**',
|
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 12:04:22 +02:00
|
|
|
'!' + SOURCE_DIR + 'js/**/*.js',
|
2013-08-07 07:25:25 +02:00
|
|
|
// Ignore version control directories.
|
|
|
|
'!' + SOURCE_DIR + '**/.{svn,git}/**'
|
|
|
|
],
|
|
|
|
tasks: ['clean:dynamic', 'copy:dynamic'],
|
|
|
|
options: {
|
|
|
|
dot: true,
|
2018-05-27 20:46:15 +02:00
|
|
|
spawn: false
|
2013-08-07 07:25:25 +02:00
|
|
|
}
|
2013-08-30 06:06:34 +02:00
|
|
|
},
|
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 12:04:22 +02:00
|
|
|
'js-enqueues': {
|
|
|
|
files: [SOURCE_DIR + 'js/_enqueues/**/*.js'],
|
|
|
|
tasks: ['clean:dynamic', 'copy:dynamic-js', 'uglify:dynamic', 'jsvalidate:dynamic'],
|
|
|
|
options: {
|
|
|
|
dot: true,
|
2018-05-27 20:46:15 +02:00
|
|
|
spawn: false
|
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 12:04:22 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
'js-webpack': {
|
|
|
|
files: [
|
|
|
|
SOURCE_DIR + 'js/**/*.js',
|
|
|
|
'!' + SOURCE_DIR + 'js/_enqueues/**/*.js',
|
|
|
|
'webpack-dev.config.js'
|
|
|
|
],
|
|
|
|
tasks: ['clean:dynamic', 'webpack:dev', 'uglify:dynamic', 'jsvalidate:dynamic'],
|
|
|
|
options: {
|
|
|
|
dot: true,
|
2018-05-27 20:46:15 +02:00
|
|
|
spawn: false
|
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 12:04:22 +02:00
|
|
|
}
|
|
|
|
},
|
2014-09-29 19:20:58 +02:00
|
|
|
config: {
|
2017-10-04 23:00:15 +02:00
|
|
|
files: [
|
|
|
|
'Gruntfile.js',
|
|
|
|
'webpack.config.js'
|
|
|
|
]
|
2014-09-29 19:20:58 +02:00
|
|
|
},
|
2013-11-14 00:37:30 +01:00
|
|
|
colors: {
|
2013-12-03 22:13:14 +01:00
|
|
|
files: [SOURCE_DIR + 'wp-admin/css/colors/**'],
|
2013-11-14 00:37:30 +01:00
|
|
|
tasks: ['sass:colors']
|
|
|
|
},
|
2013-11-12 22:18:45 +01:00
|
|
|
rtl: {
|
|
|
|
files: [
|
|
|
|
SOURCE_DIR + 'wp-admin/css/*.css',
|
|
|
|
SOURCE_DIR + 'wp-includes/css/*.css'
|
|
|
|
],
|
2015-02-27 14:40:03 +01:00
|
|
|
tasks: ['rtlcss:dynamic'],
|
2013-11-12 22:18:45 +01:00
|
|
|
options: {
|
2018-05-27 20:46:15 +02:00
|
|
|
spawn: false
|
2013-11-12 22:18:45 +01:00
|
|
|
}
|
|
|
|
},
|
2013-08-30 06:06:34 +02:00
|
|
|
test: {
|
2014-02-10 02:11:25 +01:00
|
|
|
files: [
|
|
|
|
'tests/qunit/**',
|
|
|
|
'!tests/qunit/editor/**'
|
|
|
|
],
|
2013-08-30 06:06:34 +02:00
|
|
|
tasks: ['qunit']
|
2013-08-07 07:25:25 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2016-10-21 00:23:21 +02:00
|
|
|
// Allow builds to be minimal
|
|
|
|
if( grunt.option( 'minimal-copy' ) ) {
|
|
|
|
var copyFilesOptions = grunt.config.get( 'copy.files.files' );
|
|
|
|
copyFilesOptions[0].src.push( '!wp-content/plugins/**' );
|
|
|
|
copyFilesOptions[0].src.push( '!wp-content/themes/!(twenty*)/**' );
|
|
|
|
grunt.config.set( 'copy.files.files', copyFilesOptions );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-08-07 07:25:25 +02:00
|
|
|
// Register tasks.
|
2013-10-06 12:33:01 +02:00
|
|
|
|
2017-10-04 23:00:15 +02:00
|
|
|
// Webpack task.
|
|
|
|
grunt.loadNpmTasks( 'grunt-webpack' );
|
|
|
|
|
2013-11-12 22:18:45 +01:00
|
|
|
// RTL task.
|
2015-02-27 14:40:03 +01:00
|
|
|
grunt.registerTask('rtl', ['rtlcss:core', 'rtlcss:colors']);
|
2013-11-12 22:18:45 +01:00
|
|
|
|
2013-11-14 00:37:30 +01:00
|
|
|
// Color schemes task.
|
2015-07-08 21:53:22 +02:00
|
|
|
grunt.registerTask('colors', ['sass:colors', 'postcss:colors']);
|
Merge the color schemes component from MP6. Introduces Light, Blue, and Midnight.
Color scheme selection on your own profile page gives you a preview and autosaves the selection.
Also introduces the usage of a preprocessor for core files, namely Sass. For 3.8, we will not expand its implementation past the color schemes. This does require Ruby as well as Sass 3.3.0+ due to the usage of the sourcemap option.
Note that only the default color scheme is available when running out of src. Use build to test the rest as well as the color picker.
props ryelle, melchoyce, tillkruess, drw158, littlethingsstudio, helen. see #25858, #22862.
git-svn-id: https://develop.svn.wordpress.org/trunk@26137 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-13 20:37:10 +01:00
|
|
|
|
2014-06-28 04:08:05 +02:00
|
|
|
// JSHint task.
|
2015-02-09 17:00:44 +01:00
|
|
|
grunt.registerTask( 'jshint:corejs', [
|
|
|
|
'jshint:grunt',
|
|
|
|
'jshint:tests',
|
|
|
|
'jshint:themes',
|
|
|
|
'jshint:core',
|
|
|
|
'jshint:media'
|
|
|
|
] );
|
2014-06-28 04:08:05 +02:00
|
|
|
|
REST API: Add QUnit tests for wp-api.js and PHPUnit fixture generation.
Add QUnit tests: verify that wp-api loads correctly, verify that the expected base models and collections exist and can be instantiated, verify that collections contain the correct models, verify that expected helper functions are in place for each collection.
The QUnit tests rely on two fixture files: `tests/qunit/fixtures/wp-api-generated.js` contains the data response from each core endpoint and is generated by running the PHPUnit `restapi-jsclient` group. `tests/qunit/fixtures/wp-api.js` maps the generated data to endpoint routes, and overrides `Backbone.ajax` to mock the responses for the tests.
Add PHPUnit tests in `tests/phpunit/tests/rest-api/rest-schema-setup.php`. First, verify that the API returns the expected routes via `server->get_routes()`. Then, the `test_build_wp_api_client_fixtures` test goes thru each endpoint and requests it from the API, tests that it returns data, and builds up the data for the mocked QUnit tests, saving the final results to `tests/qunit/fixtures/wp-api-generated.js`.
Add a new grunt task `restapi-jsclient` which runs the phpunit side data generation and the qunit tests together.
Props jnylen0, welcher.
Fixes #39264.
git-svn-id: https://develop.svn.wordpress.org/trunk@40058 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-14 05:22:32 +01:00
|
|
|
grunt.registerTask( 'restapi-jsclient', [
|
|
|
|
'phpunit:restapi-jsclient',
|
2017-02-15 18:58:14 +01:00
|
|
|
'qunit:compiled'
|
REST API: Add QUnit tests for wp-api.js and PHPUnit fixture generation.
Add QUnit tests: verify that wp-api loads correctly, verify that the expected base models and collections exist and can be instantiated, verify that collections contain the correct models, verify that expected helper functions are in place for each collection.
The QUnit tests rely on two fixture files: `tests/qunit/fixtures/wp-api-generated.js` contains the data response from each core endpoint and is generated by running the PHPUnit `restapi-jsclient` group. `tests/qunit/fixtures/wp-api.js` maps the generated data to endpoint routes, and overrides `Backbone.ajax` to mock the responses for the tests.
Add PHPUnit tests in `tests/phpunit/tests/rest-api/rest-schema-setup.php`. First, verify that the API returns the expected routes via `server->get_routes()`. Then, the `test_build_wp_api_client_fixtures` test goes thru each endpoint and requests it from the API, tests that it returns data, and builds up the data for the mocked QUnit tests, saving the final results to `tests/qunit/fixtures/wp-api-generated.js`.
Add a new grunt task `restapi-jsclient` which runs the phpunit side data generation and the qunit tests together.
Props jnylen0, welcher.
Fixes #39264.
git-svn-id: https://develop.svn.wordpress.org/trunk@40058 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-14 05:22:32 +01:00
|
|
|
] );
|
|
|
|
|
2015-03-05 20:48:59 +01:00
|
|
|
grunt.renameTask( 'watch', '_watch' );
|
2014-02-13 18:56:29 +01:00
|
|
|
|
2015-03-05 20:48:59 +01:00
|
|
|
grunt.registerTask( 'watch', function() {
|
2017-10-04 23:00:15 +02:00
|
|
|
if ( ! this.args.length || this.args.indexOf( 'webpack' ) > -1 ) {
|
2018-12-17 00:33:38 +01:00
|
|
|
grunt.task.run( 'build' );
|
2015-03-05 20:48:59 +01:00
|
|
|
}
|
|
|
|
|
2018-06-08 06:40:18 +02:00
|
|
|
if ( 'watch:phpunit' === grunt.cli.tasks[ 0 ] || 'undefined' !== typeof grunt.option( 'phpunit' ) ) {
|
|
|
|
grunt.config.data._watch.phpunit = {
|
|
|
|
files: [ '**/*.php' ],
|
|
|
|
tasks: [ 'phpunit:default' ]
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2015-03-05 20:48:59 +01:00
|
|
|
grunt.task.run( '_' + this.nameArgs );
|
|
|
|
} );
|
|
|
|
|
2016-04-15 12:18:03 +02:00
|
|
|
grunt.registerTask( 'precommit:image', [
|
2016-03-09 21:54:10 +01:00
|
|
|
'imagemin:core'
|
|
|
|
] );
|
|
|
|
|
|
|
|
grunt.registerTask( 'precommit:js', [
|
2017-10-04 23:00:15 +02:00
|
|
|
'webpack:prod',
|
2015-03-05 20:48:59 +01:00
|
|
|
'jshint:corejs',
|
2018-04-03 21:45:39 +02:00
|
|
|
'uglify:imgareaselect',
|
2019-02-14 01:06:39 +01:00
|
|
|
'uglify:jqueryform',
|
2015-03-13 22:08:14 +01:00
|
|
|
'qunit:compiled'
|
2015-03-05 20:48:59 +01:00
|
|
|
] );
|
|
|
|
|
2016-03-09 21:54:10 +01:00
|
|
|
grunt.registerTask( 'precommit:css', [
|
|
|
|
'postcss:core'
|
|
|
|
] );
|
|
|
|
|
|
|
|
grunt.registerTask( 'precommit:php', [
|
|
|
|
'phpunit'
|
|
|
|
] );
|
|
|
|
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
grunt.registerTask( 'precommit:emoji', [
|
|
|
|
'replace:emojiRegex'
|
|
|
|
] );
|
|
|
|
|
2016-03-09 21:54:10 +01:00
|
|
|
grunt.registerTask( 'precommit', 'Runs test and build tasks in preparation for a commit', function() {
|
|
|
|
var done = this.async();
|
2016-04-13 00:33:18 +02:00
|
|
|
var map = {
|
|
|
|
svn: 'svn status --ignore-externals',
|
|
|
|
git: 'git status --short'
|
|
|
|
};
|
|
|
|
|
|
|
|
find( [
|
|
|
|
__dirname + '/.svn',
|
|
|
|
__dirname + '/.git',
|
|
|
|
path.dirname( __dirname ) + '/.svn'
|
|
|
|
] );
|
|
|
|
|
|
|
|
function find( set ) {
|
|
|
|
var dir;
|
|
|
|
|
|
|
|
if ( set.length ) {
|
|
|
|
fs.stat( dir = set.shift(), function( error ) {
|
|
|
|
error ? find( set ) : run( path.basename( dir ).substr( 1 ) );
|
|
|
|
} );
|
|
|
|
} else {
|
2017-10-03 17:19:23 +02:00
|
|
|
runAllTasks();
|
2016-03-09 21:54:10 +01:00
|
|
|
}
|
|
|
|
}
|
2016-04-13 00:33:18 +02:00
|
|
|
|
2017-10-03 17:19:23 +02:00
|
|
|
function runAllTasks() {
|
|
|
|
grunt.log.writeln( 'Cannot determine which files are modified as SVN and GIT are not available.' );
|
|
|
|
grunt.log.writeln( 'Running all tasks and all tests.' );
|
|
|
|
grunt.task.run([
|
2018-08-17 03:50:26 +02:00
|
|
|
'format:php',
|
2017-10-03 17:19:23 +02:00
|
|
|
'precommit:js',
|
|
|
|
'precommit:css',
|
|
|
|
'precommit:image',
|
|
|
|
'precommit:emoji',
|
|
|
|
'precommit:php'
|
|
|
|
]);
|
|
|
|
|
|
|
|
done();
|
|
|
|
}
|
|
|
|
|
2016-04-13 00:33:18 +02:00
|
|
|
function run( type ) {
|
|
|
|
var command = map[ type ].split( ' ' );
|
|
|
|
|
|
|
|
grunt.util.spawn( {
|
|
|
|
cmd: command.shift(),
|
|
|
|
args: command
|
|
|
|
}, function( error, result, code ) {
|
2016-04-15 12:18:03 +02:00
|
|
|
var taskList = [];
|
|
|
|
|
2016-06-19 14:31:15 +02:00
|
|
|
// Callback for finding modified paths.
|
|
|
|
function testPath( path ) {
|
|
|
|
var regex = new RegExp( ' ' + path + '$', 'm' );
|
|
|
|
return regex.test( result.stdout );
|
|
|
|
}
|
|
|
|
|
|
|
|
// Callback for finding modified files by extension.
|
|
|
|
function testExtension( extension ) {
|
|
|
|
var regex = new RegExp( '\.' + extension + '$', 'm' );
|
|
|
|
return regex.test( result.stdout );
|
|
|
|
}
|
|
|
|
|
2017-10-03 17:19:23 +02:00
|
|
|
if ( code === 0 ) {
|
2018-08-17 03:50:26 +02:00
|
|
|
if ( [ 'package.json', 'Gruntfile.js', 'composer.json' ].some( testPath ) ) {
|
2017-10-03 17:19:23 +02:00
|
|
|
grunt.log.writeln( 'Configuration files modified. Running `prerelease`.' );
|
|
|
|
taskList.push( 'prerelease' );
|
|
|
|
} else {
|
|
|
|
if ( [ 'png', 'jpg', 'gif', 'jpeg' ].some( testExtension ) ) {
|
|
|
|
grunt.log.writeln( 'Image files modified. Minifying.' );
|
|
|
|
taskList.push( 'precommit:image' );
|
2016-06-07 05:32:22 +02:00
|
|
|
}
|
Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.
This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.
The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.
For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.
Fixes #35293.
git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 07:46:19 +02:00
|
|
|
|
2017-10-03 17:19:23 +02:00
|
|
|
[ 'js', 'css', 'php' ].forEach( function( extension ) {
|
|
|
|
if ( testExtension( extension ) ) {
|
|
|
|
grunt.log.writeln( extension.toUpperCase() + ' files modified. ' + extension.toUpperCase() + ' tests will be run.' );
|
|
|
|
taskList.push( 'precommit:' + extension );
|
|
|
|
}
|
|
|
|
} );
|
2016-04-13 00:33:18 +02:00
|
|
|
|
2017-10-03 17:19:23 +02:00
|
|
|
if ( [ 'twemoji.js' ].some( testPath ) ) {
|
|
|
|
grunt.log.writeln( 'twemoji.js has updated. Running `precommit:emoji.' );
|
|
|
|
taskList.push( 'precommit:emoji' );
|
|
|
|
}
|
2018-08-17 03:50:26 +02:00
|
|
|
|
|
|
|
if ( testExtension( 'php' ) ) {
|
|
|
|
grunt.log.writeln( 'PHP files modified. Code formatting will be run.' );
|
|
|
|
var PHPfiles = result.stdout.split( '\n' );
|
|
|
|
|
|
|
|
// Find .php files that have been modified or added.
|
|
|
|
PHPfiles = PHPfiles.filter( function( file ) {
|
|
|
|
return /^\s*[MA]\s*.*\.php$/.test( file );
|
|
|
|
} );
|
|
|
|
|
|
|
|
PHPfiles = PHPfiles.map( function( file ) {
|
|
|
|
return file.replace( /^\s*[MA]\s*/, '' );
|
|
|
|
} );
|
|
|
|
|
|
|
|
changedFiles = {
|
|
|
|
php: PHPfiles
|
|
|
|
};
|
|
|
|
|
|
|
|
taskList.push( 'format:php' );
|
|
|
|
}
|
2017-10-03 17:19:23 +02:00
|
|
|
}
|
2016-04-13 00:33:18 +02:00
|
|
|
|
2017-10-03 17:19:23 +02:00
|
|
|
grunt.task.run( taskList );
|
|
|
|
done();
|
|
|
|
} else {
|
|
|
|
runAllTasks();
|
|
|
|
}
|
2016-04-13 00:33:18 +02:00
|
|
|
} );
|
|
|
|
}
|
|
|
|
} );
|
2016-03-09 21:54:10 +01:00
|
|
|
|
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 12:04:22 +02:00
|
|
|
grunt.registerTask( 'copy:js', [
|
|
|
|
'copy:npm-packages',
|
|
|
|
'copy:vendor-js',
|
|
|
|
'copy:admin-js',
|
|
|
|
'copy:includes-js'
|
|
|
|
] );
|
|
|
|
|
2018-12-17 00:33:38 +01:00
|
|
|
grunt.registerTask( 'uglify:all', [
|
|
|
|
'uglify:core',
|
|
|
|
'uglify:embed',
|
|
|
|
'uglify:jqueryui',
|
2019-02-14 01:06:39 +01:00
|
|
|
'uglify:imgareaselect',
|
|
|
|
'uglify:jqueryform'
|
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 12:04:22 +02:00
|
|
|
] );
|
|
|
|
|
|
|
|
grunt.registerTask( 'build:js', [
|
|
|
|
'clean:js',
|
2018-12-24 14:28:22 +01:00
|
|
|
'webpack:prod',
|
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 12:04:22 +02:00
|
|
|
'webpack:dev',
|
|
|
|
'copy:js',
|
|
|
|
'file_append',
|
|
|
|
'uglify:all',
|
2019-01-18 20:50:19 +01:00
|
|
|
'concat:tinymce',
|
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 12:04:22 +02:00
|
|
|
'concat:emoji',
|
|
|
|
'jsvalidate:build'
|
|
|
|
] );
|
|
|
|
|
2018-12-24 14:28:22 +01:00
|
|
|
grunt.registerTask( 'build:css', [
|
|
|
|
'clean:css',
|
2018-12-17 00:33:38 +01:00
|
|
|
'copy:wp-admin-css-compat-rtl',
|
|
|
|
'copy:wp-admin-css-compat-min',
|
2015-03-05 20:48:59 +01:00
|
|
|
'cssmin:core',
|
|
|
|
'colors',
|
|
|
|
'rtl',
|
|
|
|
'cssmin:rtl',
|
|
|
|
'cssmin:colors',
|
2018-12-24 14:28:22 +01:00
|
|
|
'usebanner'
|
|
|
|
] );
|
|
|
|
|
|
|
|
grunt.registerTask( 'build:files', [
|
|
|
|
'clean:files',
|
|
|
|
'copy:files',
|
|
|
|
'copy:version',
|
2015-03-05 20:48:59 +01:00
|
|
|
] );
|
2013-08-07 07:25:25 +02:00
|
|
|
|
2018-12-24 14:28:22 +01:00
|
|
|
grunt.registerTask( 'build', function() {
|
|
|
|
if ( grunt.option( 'dev' ) ) {
|
|
|
|
grunt.task.run( [
|
|
|
|
'build:js',
|
|
|
|
'build:css',
|
|
|
|
] );
|
|
|
|
} else {
|
|
|
|
grunt.task.run( [
|
|
|
|
'build:files',
|
|
|
|
'build:js',
|
|
|
|
'build:css',
|
|
|
|
'includes:emoji',
|
|
|
|
'includes:embed',
|
|
|
|
] );
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2016-03-10 06:36:15 +01:00
|
|
|
grunt.registerTask( 'prerelease', [
|
2018-08-17 03:50:26 +02:00
|
|
|
'format:php:error',
|
2016-03-10 06:36:15 +01:00
|
|
|
'precommit:php',
|
|
|
|
'precommit:js',
|
|
|
|
'precommit:css',
|
2016-04-15 12:18:03 +02:00
|
|
|
'precommit:image'
|
2016-03-10 06:36:15 +01:00
|
|
|
] );
|
|
|
|
|
2013-11-09 21:43:58 +01:00
|
|
|
// Testing tasks.
|
2014-11-10 15:48:28 +01:00
|
|
|
grunt.registerMultiTask('phpunit', 'Runs PHPUnit tests, including the ajax, external-http, and multisite tests.', function() {
|
2013-11-09 22:25:02 +01:00
|
|
|
grunt.util.spawn({
|
|
|
|
cmd: this.data.cmd,
|
2018-02-27 01:31:33 +01:00
|
|
|
args: phpUnitWatchGroup ? this.data.args.concat( [ '--group', phpUnitWatchGroup ] ) : this.data.args,
|
2013-11-09 22:25:02 +01:00
|
|
|
opts: {stdio: 'inherit'}
|
|
|
|
}, this.async());
|
2013-11-09 22:18:23 +01:00
|
|
|
});
|
|
|
|
|
2013-11-09 22:25:02 +01:00
|
|
|
grunt.registerTask('qunit:compiled', 'Runs QUnit tests on compiled as well as uncompiled scripts.',
|
2013-11-13 00:20:28 +01:00
|
|
|
['build', 'copy:qunit', 'qunit']);
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
git-svn-id: https://develop.svn.wordpress.org/trunk@26876 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-29 00:52:04 +01:00
|
|
|
|
2013-11-09 22:25:02 +01:00
|
|
|
grunt.registerTask('test', 'Runs all QUnit and PHPUnit tasks.', ['qunit:compiled', 'phpunit']);
|
2014-06-21 22:05:19 +02:00
|
|
|
|
2018-08-17 03:50:26 +02:00
|
|
|
grunt.registerTask( 'format:php', 'Runs the code formatter on changed files.', function() {
|
|
|
|
var done = this.async();
|
|
|
|
var flags = this.flags;
|
|
|
|
var args = changedFiles.php;
|
|
|
|
args.unshift( 'format' );
|
|
|
|
grunt.util.spawn( {
|
|
|
|
cmd: 'composer',
|
|
|
|
args: args,
|
|
|
|
opts: { stdio: 'inherit' }
|
|
|
|
}, function( error ) {
|
|
|
|
if ( flags.error && error ) {
|
|
|
|
done( false );
|
|
|
|
} else {
|
|
|
|
done( true );
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|
|
2014-06-21 22:05:19 +02:00
|
|
|
// Travis CI tasks.
|
2014-06-28 04:08:05 +02:00
|
|
|
grunt.registerTask('travis:js', 'Runs Javascript Travis CI tasks.', [ 'jshint:corejs', 'qunit:compiled' ]);
|
2018-05-23 13:02:28 +02:00
|
|
|
grunt.registerTask('travis:phpunit', 'Runs PHPUnit Travis CI tasks.', [ 'build', 'phpunit' ]);
|
2018-08-17 03:50:26 +02:00
|
|
|
grunt.registerTask('travis:format', 'Runs Code formatting Travis CI tasks.', [ 'format:php:error' ]);
|
2013-08-30 06:06:34 +02:00
|
|
|
|
2014-02-26 22:45:55 +01:00
|
|
|
// Patch task.
|
|
|
|
grunt.renameTask('patch_wordpress', 'patch');
|
|
|
|
|
2016-11-10 04:21:39 +01:00
|
|
|
// Add an alias `apply` of the `patch` task name.
|
|
|
|
grunt.registerTask('apply', 'patch');
|
|
|
|
|
2013-08-07 07:25:25 +02:00
|
|
|
// Default task.
|
|
|
|
grunt.registerTask('default', ['build']);
|
|
|
|
|
2015-09-09 04:11:23 +02:00
|
|
|
/*
|
|
|
|
* Automatically updates the `:dynamic` configurations
|
|
|
|
* so that only the changed files are updated.
|
|
|
|
*/
|
2018-05-29 16:20:44 +02:00
|
|
|
grunt.event.on( 'watch', function( action, filepath, target ) {
|
2015-09-09 04:11:23 +02:00
|
|
|
var src;
|
|
|
|
|
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 12:04:22 +02:00
|
|
|
// Only configure the dynamic tasks based on known targets.
|
|
|
|
if ( [ 'all', 'rtl', 'webpack', 'js-enqueues', 'js-webpack' ].indexOf( target ) === -1 ) {
|
2013-08-31 00:16:43 +02:00
|
|
|
return;
|
2013-10-27 22:53:11 +01:00
|
|
|
}
|
2013-08-31 00:16:43 +02:00
|
|
|
|
2018-05-29 16:20:44 +02:00
|
|
|
// Normalize filepath for Windows.
|
|
|
|
filepath = filepath.replace( /\\/g, '/' );
|
|
|
|
|
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 12:04:22 +02:00
|
|
|
// If the target is a file in the restructured js src.
|
|
|
|
if ( target === 'js-enqueues' ) {
|
|
|
|
var files = {};
|
|
|
|
var configs, dest;
|
|
|
|
|
|
|
|
// If it's a vendor file which are configured with glob matchers.
|
|
|
|
if ( filepath.indexOf( SOURCE_DIR + 'js/_enqueues/vendor/' ) === 0 ) {
|
|
|
|
// Grab the glob matchers from the copy task.
|
|
|
|
configs = grunt.config( [ 'copy', 'vendor-js', 'files' ] );
|
|
|
|
|
|
|
|
// For each glob matcher check if it matches and if so set the variables for our dynamic tasks.
|
|
|
|
for ( var i = 0; i < configs.length; i++ ) {
|
|
|
|
var config = configs[ i ];
|
|
|
|
var relative = path.relative( config.cwd, filepath );
|
|
|
|
var minimatch = require('minimatch');
|
|
|
|
|
|
|
|
if ( minimatch.match( config.src, relative, {} ) ) {
|
|
|
|
dest = config.dest + relative;
|
2018-12-24 14:28:22 +01:00
|
|
|
src = [ path.relative( WORKING_DIR, dest ) ];
|
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 12:04:22 +02:00
|
|
|
files[ dest ] = [ filepath ];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Or if it's another file which has a straight mapping.
|
|
|
|
} else {
|
|
|
|
configs = Object.assign( {},
|
|
|
|
grunt.config( [ 'copy', 'admin-js', 'files' ] ),
|
|
|
|
grunt.config( [ 'copy', 'includes-js', 'files' ] )
|
|
|
|
);
|
2018-05-29 16:20:44 +02:00
|
|
|
|
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 12:04:22 +02:00
|
|
|
for ( dest in configs ) {
|
|
|
|
// If a file in the mapping matches then set the variables for our dynamic tasks.
|
2018-05-29 16:20:44 +02:00
|
|
|
if ( dest && configs.hasOwnProperty( dest ) && configs[ dest ][0] === './' + filepath ) {
|
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 12:04:22 +02:00
|
|
|
files[ dest ] = configs[ dest ];
|
2018-12-24 14:28:22 +01:00
|
|
|
src = [ path.relative( WORKING_DIR, dest ) ];
|
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 12:04:22 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Configure our dynamic-js copy task which uses a file mapping rather than simply copying from src to build.
|
|
|
|
if ( action !== 'deleted' ) {
|
|
|
|
grunt.config( [ 'copy', 'dynamic-js', 'files' ], files );
|
|
|
|
}
|
|
|
|
// For the webpack builds configure the jsvalidate task to only check those files build by webpack.
|
|
|
|
} else if ( target === 'js-webpack' ) {
|
|
|
|
src = [
|
|
|
|
'wp-includes/js/media-audiovideo.js',
|
|
|
|
'wp-includes/js/media-grid.js',
|
|
|
|
'wp-includes/js/media-models.js',
|
|
|
|
'wp-includes/js/media-views.js'
|
|
|
|
];
|
|
|
|
// Else simply use the path relative to the source directory.
|
|
|
|
} else {
|
|
|
|
src = [ path.relative( SOURCE_DIR, filepath ) ];
|
|
|
|
}
|
2015-10-07 02:00:00 +02:00
|
|
|
|
2018-05-29 16:20:44 +02:00
|
|
|
if ( ! src ) {
|
|
|
|
grunt.warn( 'Failed to determine the destination file.' );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2015-09-09 04:11:23 +02:00
|
|
|
if ( action === 'deleted' ) {
|
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 12:04:22 +02:00
|
|
|
// Clean up only those files that were deleted.
|
2015-09-09 04:11:23 +02:00
|
|
|
grunt.config( [ 'clean', 'dynamic', 'src' ], src );
|
|
|
|
} else {
|
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 12:04:22 +02:00
|
|
|
// Otherwise copy over only the changed file.
|
2015-09-09 04:11:23 +02:00
|
|
|
grunt.config( [ 'copy', 'dynamic', 'src' ], src );
|
2013-08-07 07:25:25 +02:00
|
|
|
|
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 12:04:22 +02:00
|
|
|
// For javascript also minify and validate the changed file.
|
|
|
|
if ( target === 'js-enqueues' ) {
|
|
|
|
grunt.config( [ 'uglify', 'dynamic', 'src' ], src );
|
2018-12-24 14:28:22 +01:00
|
|
|
grunt.config( [ 'jsvalidate', 'dynamic', 'files', 'src' ], src.map( function( dir ) { return WORKING_DIR + dir; } ) );
|
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 12:04:22 +02:00
|
|
|
}
|
|
|
|
// For webpack only validate the file, minification is handled by webpack itself.
|
|
|
|
if ( target === 'js-webpack' ) {
|
2018-12-24 14:28:22 +01:00
|
|
|
grunt.config( [ 'jsvalidate', 'dynamic', 'files', 'src' ], src.map( function( dir ) { return WORKING_DIR + dir; } ) );
|
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 12:04:22 +02:00
|
|
|
}
|
|
|
|
// For css run the rtl task on just the changed file.
|
2015-09-09 04:11:23 +02:00
|
|
|
if ( target === 'rtl' ) {
|
|
|
|
grunt.config( [ 'rtlcss', 'dynamic', 'src' ], src );
|
|
|
|
}
|
|
|
|
}
|
2013-08-07 07:25:25 +02:00
|
|
|
});
|
|
|
|
};
|