diff --git a/.gitignore b/.gitignore index 378eac2..e3fbd98 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ build +node_modules diff --git a/package.json b/package.json new file mode 100644 index 0000000..8ad58e3 --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "instantclick", + "version": "4.0.0", + "description": "InstantClick makes following links in your website instant.", + "main": "src/instantclick.js", + "directories": { + "test": "tests" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/dieulot/instantclick.git" + }, + "keywords": [ + "pjax" + ], + "author": "dieulot", + "license": "MIT", + "bugs": { + "url": "https://github.com/dieulot/instantclick/issues" + }, + "homepage": "http://instantclick.io/" +} diff --git a/src/instantclick.js b/src/instantclick.js index a564c39..3e3824c 100644 --- a/src/instantclick.js +++ b/src/instantclick.js @@ -967,3 +967,13 @@ var instantclick } }(document, location, navigator.userAgent); + +(function (root, InstantClick) { + if (typeof define === 'function' && define.amd) { + define([], InstantClick); + } else if (typeof module === 'object' && module.exports) { + module.exports = InstantClick; + } else { + root.returnExports = InstantClick; + } +}(this, InstantClick));