Build/Test Tools: Replace the banner text from wp-emoji-loader.min.js
in formatting.php
during build process.
This ensures that `/*! This file is auto-generated */` comment is not included on front end as part of the inline Emoji detection script. Follow-up to [41271], [46589]. Props superpoincare, SergeyBiryukov. Fixes #49861. git-svn-id: https://develop.svn.wordpress.org/trunk@48096 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
82cfc3f62d
commit
44def76306
21
Gruntfile.js
21
Gruntfile.js
@ -1097,6 +1097,26 @@ module.exports = function(grunt) {
|
||||
dest: SOURCE_DIR + 'wp-includes/'
|
||||
}
|
||||
]
|
||||
},
|
||||
emojiBannerText: {
|
||||
options: {
|
||||
patterns: [
|
||||
{
|
||||
match: new RegExp( '\\s*' + BANNER_TEXT.replace( /[\/\*\!]/g, '\\$&' ) ),
|
||||
replacement: ''
|
||||
}
|
||||
]
|
||||
},
|
||||
files: [
|
||||
{
|
||||
expand: true,
|
||||
flatten: true,
|
||||
src: [
|
||||
BUILD_DIR + 'wp-includes/formatting.php'
|
||||
],
|
||||
dest: BUILD_DIR + 'wp-includes/'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
_watch: {
|
||||
@ -1419,6 +1439,7 @@ module.exports = function(grunt) {
|
||||
'build:css',
|
||||
'includes:emoji',
|
||||
'includes:embed',
|
||||
'replace:emojiBannerText'
|
||||
] );
|
||||
}
|
||||
} );
|
||||
|
Loading…
Reference in New Issue
Block a user