12345678910111213141516171819202122232425262728293031323334 |
-
-
- 'use strict';
-
- exports.init = function(/*grunt*/) {
- var exports = {};
-
-
- exports.stripBanner = function(src, options) {
- if (!options) { options = {}; }
- var m = [];
- if (options.line) {
-
- m.push('(?:.*\\/\\/.*\\r?\\n)+\\s*');
- }
- if (options.block) {
-
- m.push('\\/\\*[\\s\\S]*?\\*\\/');
- } else {
-
- m.push('\\/\\*[^!][\\s\\S]*?\\*\\/');
- }
- var re = new RegExp('^\\s*(?:' + m.join('|') + ')\\s*', '');
- return src.replace(re, '');
- };
-
- return exports;
- };
|