Skip to content

Commit

Permalink
Add browserify support(resolves #65)
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed Apr 17, 2015
1 parent 21d54c4 commit edf095b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sudo: required
language: node_js
node_js:
- 0.10

- 0.12
before_install:
- "curl https://install.meteor.com | /bin/sh"
install: npm start
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CONTRIBUTING
====

1. Fork.
2. Run `npm install`.
2. Run `npm start`.
3. Make your changes on the `src` folder.
4. Update tests.
5. Run `npm test`, make sure everything is okay.
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
},
"homepage": "http://vodkabears.github.io/vide/",
"license": "MIT",
"main": "dist/jquery.vide.js",
"dependencies": {
"jquery": "*"
},
Expand All @@ -44,7 +45,7 @@
"spacejam": "^1.1.4"
},
"scripts": {
"postinstall": "./node_modules/.bin/bower install && ./node_modules/.bin/grunt githooks",
"start": "npm install && ./node_modules/.bin/bower install && ./node_modules/.bin/grunt githooks",
"test": "./node_modules/.bin/grunt test"
}
}
14 changes: 12 additions & 2 deletions src/jquery.vide.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
!(function($, window, document, navigator) {
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof exports === 'object') {
factory(require('jquery'));
} else {
factory(root.jQuery);
}
})(this, function($) {

'use strict';

/**
Expand Down Expand Up @@ -457,4 +466,5 @@
$element[pluginName](path, options);
});
});
})(window.jQuery, window, document, navigator);

});

0 comments on commit edf095b

Please sign in to comment.