From f3fdca462d80a27cf003120f58783d74f5664539 Mon Sep 17 00:00:00 2001 From: orcaman Date: Tue, 7 Apr 2015 17:41:12 +0300 Subject: [PATCH] commonJSify --- package.json | 3 ++- src/motio.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3e1b0c5..a1d8f26 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "motio", - "version": "0.0.0", + "version": "0.0.1", + "main": "src/motio.js", "devDependencies": { "grunt-contrib-jshint": "~0.7.2", "grunt-contrib-concat": "~0.3.0", diff --git a/src/motio.js b/src/motio.js index 547082b..6fea0ef 100644 --- a/src/motio.js +++ b/src/motio.js @@ -517,4 +517,8 @@ bgWidth: 0, // Width of the background image (optional). bgHeight: 0 // Height of the background image (optional). }; + + if (typeof exports === 'object' && typeof module === 'object') { + module.exports = Motio; + } })(window); \ No newline at end of file