Skip to content

Commit

Permalink
Merge pull request #80 from ArnaudRinquin/feature_commonjs
Browse files Browse the repository at this point in the history
CommonJS compliance
  • Loading branch information
siddii committed May 21, 2014
2 parents 2ea80a4 + b5a0db8 commit 3a7e4da
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
7 changes: 6 additions & 1 deletion app/js/timer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('timer', [])
var timerModule = angular.module('timer', [])
.directive('timer', ['$compile', function ($compile) {
return {
restrict: 'EAC',
Expand Down Expand Up @@ -246,3 +246,8 @@ angular.module('timer', [])
}]
};
}]);

/* commonjs package manager support (eg componentjs) */
if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){
module.exports = timerModule;
}
9 changes: 7 additions & 2 deletions dist/angular-timer.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* angular-timer - v1.1.3 - 2014-05-19 11:08 PM
* angular-timer - v1.1.3 - 2014-05-21 5:58 PM
* https://github.com/siddii/angular-timer
*
* Copyright (c) 2014 Siddique Hameed
* Licensed MIT <https://github.com/siddii/angular-timer/blob/master/LICENSE.txt>
*/
angular.module('timer', [])
var timerModule = angular.module('timer', [])
.directive('timer', ['$compile', function ($compile) {
return {
restrict: 'EAC',
Expand Down Expand Up @@ -253,3 +253,8 @@ angular.module('timer', [])
}]
};
}]);

/* commonjs package manager support (eg componentjs) */
if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){
module.exports = timerModule;
}
4 changes: 2 additions & 2 deletions dist/angular-timer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"name": "angular-timer",
"version": "1.1.3",
"homepage": "https://github.com/siddii/angular-timer",
"main":"dist/angular-timer.js",
"licenses": {
"type": "MIT",
"url": "https://github.com/siddii/angular-timer/blob/master/LICENSE.txt"
Expand Down

0 comments on commit 3a7e4da

Please sign in to comment.