Minor gulpfile/Gruntfile corrections
This commit is contained in:
parent
79b04e2eac
commit
00b5c69f53
2 changed files with 7 additions and 8 deletions
|
|
@ -199,7 +199,7 @@ module.exports = function(grunt) {
|
||||||
banner: '"use strict";\n\n',
|
banner: '"use strict";\n\n',
|
||||||
process: function(src, filepath) {
|
process: function(src, filepath) {
|
||||||
return "// " + filepath + "\n\n" +
|
return "// " + filepath + "\n\n" +
|
||||||
src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1').replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\2\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*[A-Za-z_][A-Za-z0-9_\.]*\.assert\([^\n]*\);[^\n]*/g, '');
|
src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1').replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\1\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*[A-Za-z_][A-Za-z0-9_\.]*\.assert\([^\n]*\);[^\n]*/g, '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -210,7 +210,7 @@ module.exports = function(grunt) {
|
||||||
banner: '"use strict";\n\n',
|
banner: '"use strict";\n\n',
|
||||||
process: function(src, filepath) {
|
process: function(src, filepath) {
|
||||||
return "// " + filepath + "\n\n" +
|
return "// " + filepath + "\n\n" +
|
||||||
src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1').replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\2\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*[A-Za-z_][A-Za-z0-9_\.]*\.assert\([^\n]*\);[^\n]*/g, '');
|
src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1').replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\1\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*[A-Za-z_][A-Za-z0-9_\.]*\.assert\([^\n]*\);[^\n]*/g, '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -221,7 +221,7 @@ module.exports = function(grunt) {
|
||||||
banner: '"use strict";\n\n',
|
banner: '"use strict";\n\n',
|
||||||
process: function(src, filepath) {
|
process: function(src, filepath) {
|
||||||
return "// " + filepath + "\n\n" +
|
return "// " + filepath + "\n\n" +
|
||||||
src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1').replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\2\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*[A-Za-z_][A-Za-z0-9_\.]*\.assert\([^\n]*\);[^\n]*/g, '');
|
src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1').replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\1\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*[A-Za-z_][A-Za-z0-9_\.]*\.assert\([^\n]*\);[^\n]*/g, '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -232,7 +232,7 @@ module.exports = function(grunt) {
|
||||||
banner: '"use strict";\n\n',
|
banner: '"use strict";\n\n',
|
||||||
process: function(src, filepath) {
|
process: function(src, filepath) {
|
||||||
return "// " + filepath + "\n\n" +
|
return "// " + filepath + "\n\n" +
|
||||||
src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1').replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\2\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*[A-Za-z_][A-Za-z0-9_\.]*\.assert\([^\n]*\);[^\n]*/g, '');
|
src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1').replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\1\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*[A-Za-z_][A-Za-z0-9_\.]*\.assert\([^\n]*\);[^\n]*/g, '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ gulp.task('mktmp', function() {
|
||||||
.pipe(header('/* ' + file.path + ' */\n\n'))
|
.pipe(header('/* ' + file.path + ' */\n\n'))
|
||||||
.pipe(replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, "$1"))
|
.pipe(replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, "$1"))
|
||||||
.pipe(replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, ""))
|
.pipe(replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, ""))
|
||||||
.pipe(replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\2\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, ""))
|
.pipe(replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\1\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, ""))
|
||||||
.pipe(replace(/[ \t]*[A-Za-z_][A-Za-z0-9_.]*\.assert\([^\n]*\);[^\n]*/g, ""))
|
.pipe(replace(/[ \t]*[A-Za-z_][A-Za-z0-9_.]*\.assert\([^\n]*\);[^\n]*/g, ""))
|
||||||
}))
|
}))
|
||||||
.pipe(concat(pcX86ReleaseFile))
|
.pipe(concat(pcX86ReleaseFile))
|
||||||
|
|
@ -98,10 +98,9 @@ gulp.task('compile', function() {
|
||||||
externs: [{src: 'var global; var resources;'}], // TODO: Can this refer to "externs.js" instead?
|
externs: [{src: 'var global; var resources;'}], // TODO: Can this refer to "externs.js" instead?
|
||||||
warningLevel: 'VERBOSE',
|
warningLevel: 'VERBOSE',
|
||||||
/*
|
/*
|
||||||
* outputWrapper support was recently removed (without any obvious explanation), so we take care
|
* outputWrapper support isn't available yet, so we take care of it below, using the gulp-wrapper plug-in.
|
||||||
* of it below, using the gulp-wrapper plug-in.
|
|
||||||
*
|
*
|
||||||
* outputWrapper: '(function(){\n%output%\n}).call(this)',
|
* outputWrapper: '(function(){%output%})()',
|
||||||
*/
|
*/
|
||||||
jsOutputFile: pcX86ReleaseFile, // TODO: This must vary according to debugger/non-debugger releases
|
jsOutputFile: pcX86ReleaseFile, // TODO: This must vary according to debugger/non-debugger releases
|
||||||
createSourceMap: false
|
createSourceMap: false
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue