Build: Fix the regex removing the ESLint comment from wrapper.js

The new regex from after the switch from JSHint to ESLint wasn't catching
the ESLint pragma correctly.

Also, the spacing of the pragma comment was updated to match other comments.
This commit is contained in:
Michał Gołębiowski 2016-07-13 10:49:13 +02:00
parent 02c5e2908c
commit 6e605afb1f
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ module.exports = function( grunt ) {
// Avoid breaking semicolons inserted by r.js
skipSemiColonInsertion: true,
wrap: {
start: wrapper[ 0 ].replace( /\/\*eslint .* \*\/\n/, "" ),
start: wrapper[ 0 ].replace( /\/\*\s*eslint(?: |-).*\s*\*\/\n/, "" ),
end: globals.replace(
/\/\*\s*ExcludeStart\s*\*\/[\w\W]*?\/\*\s*ExcludeEnd\s*\*\//ig,
""