Based on fmph's quark package starter.
Basic example.
import Sharer from 'mm-sharer'
Sharer.facebook("http://www.google.fr");
Returns Facebook sharing URL
Opens a popup for sharing on Facebook
Returns LinkedIn sharing URL
Opens a popup for sharing on LinkedIn
Returns Twitter sharing URL
Opens a popup for sharing on Twitter
Returns Pinterest sharing URL
Opens a popup for sharing on Pinterest
Sharer.openPopup(link, width = this.DEFAULT_POPUP_SIZES.default.width, height = this.DEFAULT_POPUP_SIZES.default.height)
Opens a popup
To build the sources with babel
in ./lib
directory :
npm run build
To generate the JSDoc
:
npm run docs
To generate the documentation and deploy on gh-pages
branch :
npm run docs:deploy
To run the tests, first clone the repository and install its dependencies :
git clone https://github.com/MM56/mm-sharer.git
cd mm-sharer
npm install
Then, run the tests :
npm test
To watch (test-driven development) :
npm run test:watch
For coverage :
npm run test:coverage