Permalink
Browse files

Wrap in UMD. Fixes GH-8

  • Loading branch information...
1 parent 4b6d5ee commit 22db73ca554efa608ae1abd544ff7e24ea2cce54 @shama committed Jul 24, 2014
Showing with 18 additions and 0 deletions.
  1. +13 −0 README.md
  2. +5 −0 index.js
View
@@ -173,6 +173,19 @@ With [npm](http://npmjs.org) do:
npm install atlaspack
```
+## using standalone / non-browserify
+
+It is wrapped in an UMD for use outside of browserify.
+
+Add a script tag to your HTML and use globally exposed `atlaspack` variable:
+
+```html
+<script src="node_modules/atlaspack/index.js"></script>
+<script>
+var atlas = window.atlaspack(canvas);
+</script>
+```
+
## release history
* 0.2.6 - Fix _uvcache should be an object (@deathcap).
* 0.2.5 - clearRect before placing image onto a canvas.
View
@@ -1,3 +1,4 @@
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.atlaspack=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/*
* atlaspack
* https://github.com/shama/atlaspack
@@ -251,3 +252,7 @@ Atlas.prototype._debug = function() {
context.strokeRect(rect.x, rect.y, rect.w, rect.h);
});
};
+
+},{}]},{},[1])
+(1)
+});;

0 comments on commit 22db73c

Please sign in to comment.