diff --git a/.gitignore b/.gitignore index bbbfe88..5d25b48 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ node_modules -bower_components coverage .DS_Store _site diff --git a/README.md b/README.md index e90d8d2..ac6007e 100644 --- a/README.md +++ b/README.md @@ -3,28 +3,23 @@ Categorize, sort, and filter a responsive grid of items. ```bash -npm install shufflejs --save +npm install shufflejs ``` -Shuffle is also available on bower as `shufflejs`. - ## Docs and Demos [All found here][homepage] -### Usage (with CommonJS) +### Usage (with ES6) ```js -var Shuffle = require('shufflejs'); +import Shuffle from 'shufflejs'; -var myShuffle = new Shuffle(document.getElementById('grid'), { +const myShuffle = new Shuffle(document.getElementById('grid'), { itemSelector: '.js-item', sizer: '.js-shuffle-sizer' }); ``` -## Shuffle 4.0 -Shuffle 4 removes jQuery as a dependency and is written in ES6. - ## Inspiration This project was inspired by [Isotope](http://isotope.metafizzy.co/) and [Packery](http://packery.metafizzy.co/). diff --git a/_config.yml b/_config.yml index 123625a..32ce219 100644 --- a/_config.yml +++ b/_config.yml @@ -11,7 +11,6 @@ exclude: [ 'node_modules', 'src', 'test', - 'bower.json', 'CONTRIBUTING.md', 'gulpfile.js', 'README.md', diff --git a/_includes/changelog.html b/_includes/changelog.html index 315adc1..e018e03 100644 --- a/_includes/changelog.html +++ b/_includes/changelog.html @@ -1,5 +1,6 @@
v5.0.0
x/x/17 - Change global export from shuffle
to Shuffle
. Remove bower support. Expect ES6 environment. Make Shuffle instances Event Emitters instead of dispatching CustomEvent
.v4.2.0
5/10/17 - Replace webpack
build with rollup
. Replace jshint
and jscs
with eslint
. Add filterMode
option.v4.1.1
3/21/17 - the before
styles for a ShuffleItem
were not applied if the item didn’t move.v4.1.0
1/30/17 - Use webpack-2 to bundle Shuffle.npm install shufflejs --save
+ npm install shufflejs
Shuffle is also available on bower as shufflejs
.
Shuffle's dependencies are bundled with the dist file.
+Shuffle does, however, expect the following ES6/7 features: Set
, Array.from
, Object.assign
, and Array.prototype.includes
. In order to support browsers like IE11 and Safari 8, you must include a polyfill for these features. You can use a service like polyfill.io to only load the polyfills that specific browser needs, or a polyfill script like babel-polyfill (which uses core-js
internally).