From c504372df01c202f0029171b92d73530de8d6210 Mon Sep 17 00:00:00 2001 From: onkeltem Date: Thu, 3 Dec 2015 15:44:20 +0300 Subject: [PATCH] Add header to support commonjs package managers --- Gruntfile.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 744af4d..d9adab6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -30,7 +30,12 @@ module.exports = function (grunt) { }, release: { options: { - banner: '<%= headerRelease %><%= banner %>\n(function (window, angular, undefined) {\n', + banner: '<%= headerRelease %><%= banner %>\n'+ + '/* commonjs package manager support (eg componentjs) */\n'+ + 'if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){\n'+ + ' module.exports = \'ncy-angular-breadcrumb\';\n'+ + '}\n\n'+ + '(function (window, angular, undefined) {\n', footer: '})(window, window.angular);\n', stripBanners: true },