Skip to content

Commit

Permalink
Update version, add AMD/CommonJS to angular
Browse files Browse the repository at this point in the history
  • Loading branch information
bhollis committed May 22, 2016
1 parent ef86777 commit 279645f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
0.1.0
2.0.0
-----

* Fix marker orientation - it was diagonally inverted!
* Add CommonJS and AMD support to the Angular directive.

1.0.0
-----

* Initial release
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aruco-marker",
"version": "1.0.0",
"version": "2.0.0",
"authors": [
"Ben Hollis <ben@benhollis.net>"
],
Expand Down
20 changes: 18 additions & 2 deletions ng-aruco-marker.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
// AngularJS Directive for Aruco marker images
// Usage:
// <aruco-marker marker-id="{{markerId}}" size="500px"/>
(function() {
(function (root, factory) {
if (typeof module !== 'undefined' && module.exports) {
// CommonJS
if (typeof angular === 'undefined') {
factory(require('angular'));
} else {
factory(angular);
}
module.exports = 'ngDialog';
} else if (typeof define === 'function' && define.amd) {
// AMD
define(['angular'], factory);
} else {
// Global Variables
factory(root.angular);
}
}(this, function (angular) {
angular.module('arucoMarker', []).directive('arucoMarker', function() {
return {
restrict: 'E',
Expand All @@ -17,4 +33,4 @@
}
};
});
})();
}));
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aruco-marker",
"version": "1.0.0",
"version": "2.0.0",
"description": "Library for generating Aruco marker images",
"main": "aruco-marker.js",
"scripts": {
Expand Down

0 comments on commit 279645f

Please sign in to comment.