From 1bb49b7347a2e819b98018a33add697856c9f267 Mon Sep 17 00:00:00 2001 From: Joseph Frazier Date: Tue, 30 Sep 2014 08:46:13 -0400 Subject: [PATCH] Gruntfile.js: remove templates from banner string Simplify browserify's postBundleCB --- Gruntfile.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 7f90b5c58..9c2cc65bc 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,10 +4,11 @@ module.exports = function(grunt) { var pkg = grunt.file.readJSON('package.json'); + var year = new Date().getFullYear() var banner = '\ /*\n\ - * SIP version <%= pkg.version %>\n\ - * Copyright (c) 2014-<%= grunt.template.today("yyyy") %> Junction Networks, Inc \n\ + * SIP version ' + pkg.version + '\n\ + * Copyright (c) 2014-' + year + ' Junction Networks, Inc \n\ * Homepage: http://sipjs.com\n\ * License: http://sipjs.com/license/\n\ *\n\ @@ -55,12 +56,8 @@ module.exports = function(grunt) { standalone: 'SIP' }, postBundleCB: function (err, src, next) { - // prepend the banner and fill in placeholders - src = (banner + src).replace(/<%=(.*)%>/g, function (match, expr) { - // jshint evil:true - return eval(expr); - }); - next(err, src); + // prepend the banner + next(err, banner + src); } } },