Add ES6/7 env note. Remove references to bower.

Remove `--save` from npm install because npm@5 saves automatically.
pull/160/head
Glen Cheney 7 years ago
parent e1edc7af50
commit 6bdc0491a9

1
.gitignore vendored

@ -1,5 +1,4 @@
node_modules
bower_components
coverage
.DS_Store
_site

@ -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/).

@ -11,7 +11,6 @@ exclude: [
'node_modules',
'src',
'test',
'bower.json',
'CONTRIBUTING.md',
'gulpfile.js',
'README.md',

@ -1,5 +1,6 @@
<h2>Changes<a href="#changelog"></a></h2>
<ul>
<li><code>v5.0.0</code> x/x/17 - Change global export from <code>shuffle</code> to <code>Shuffle</code>. Remove bower support. Expect ES6 environment. Make Shuffle instances Event Emitters instead of dispatching <code>CustomEvent</code>.</li>
<li><code>v4.2.0</code> 5/10/17 - Replace <code>webpack</code> build with <code>rollup</code>. Replace <code>jshint</code> and <code>jscs</code> with <code>eslint</code>. Add <code>filterMode</code> option.</li>
<li><code>v4.1.1</code> 3/21/17 - the <code>before</code> styles for a <code>ShuffleItem</code> were not applied if the item didn&rsquo;t move.</li>
<li><code>v4.1.0</code> 1/30/17 - Use webpack-2 to bundle Shuffle.</li>

@ -14,9 +14,8 @@ prism: true
</div>
<div class="col-12@sm">
<div class="code-block">
<pre><code class="language">npm install shufflejs --save</code></pre>
<pre><code class="language">npm install shufflejs</code></pre>
</div>
<p>Shuffle is also available on bower as <code>shufflejs</code>.</p>
</div>
</div>
<div class="row">
@ -200,6 +199,7 @@ prism: true
<div class="col-12@sm">
<h2>Dependencies<a href="#dependencies"></a></h2>
<p>Shuffle's <a href="{{ site.baseurl }}/package.json">dependencies</a> are bundled with the dist file.</p>
<p>Shuffle does, however, expect the following ES6/7 features: <code>Set</code>, <code>Array.from</code>, <code>Object.assign</code>, and <code>Array.prototype.includes</code>. In order to support browsers like IE11 and Safari 8, you must include a polyfill for these features. You can use a service like <a href="https://polyfill.io">polyfill.io</a> to only load the polyfills that specific browser needs, or a polyfill script like <a href="https://www.npmjs.com/package/babel-polyfill">babel-polyfill</a> (which uses <code>core-js</code> internally).</p>
</div>
</div>
</div>

Loading…
Cancel
Save