From 6e61b296ca66f8312eef400de98e08cf909e38b5 Mon Sep 17 00:00:00 2001 From: Julien Date: Tue, 6 Oct 2015 23:56:23 +0200 Subject: [PATCH] enable the load ui-ace as a commonjs module exports the module name expose dependencies to other angular module --- src/ui-ace.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/ui-ace.js b/src/ui-ace.js index a664fb1..5d592a7 100644 --- a/src/ui-ace.js +++ b/src/ui-ace.js @@ -1,5 +1,17 @@ +/* */ +'format global'; +'deps angular'; +/*global module, exports*/ +/*jshint globalstrict:true*/ 'use strict'; +/* commonjs package manager support (eg componentjs) */ +if (typeof module !== 'undefined' && typeof exports !== 'undefined' && module.exports === exports){ + module.exports = 'ui.ace'; +} + +(function (window, angular, undefined) { + /** * Binds a ACE Editor widget */ @@ -326,3 +338,4 @@ angular.module('ui.ace', []) } }; }]); +})(window, window.angular);