README.md in futurism-0.1.2 vs README.md in futurism-0.1.4

- old
+ new

@@ -1,11 +1,26 @@ # Futurism +[![Twitter follow](https://img.shields.io/twitter/follow/julian_rubisch?style=social)](https://twitter.com/julian_rubisch) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> -[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-) <!-- ALL-CONTRIBUTORS-BADGE:END --> Lazy-load Rails partials via CableReady +## Facts +- only one dependency: CableReady +- bundle size (without CableReady) is around [~1.04kB](https://bundlephobia.com/result?p=@minthesize/futurism@0.1.3) + +### Browser Support + +- Chrome v67+ (v54+ via Polyfill) +- Firefox v63+ +- Edge v79+ +- Safari v10.1+ via Polyfill +- iOS Safari & Chrome v10.3+ via Polyfill + +[Caniuse](https://www.caniuse.com/#search=custom%20elements) + ## Usage with a helper in your template ```erb <%= futurize @posts %> @@ -55,11 +70,30 @@ ```bash $ bin/rails futurism:install ``` +** ! Note that the installer will run `yarn install @minthesize/futurism` for you ! ** +### Manual Installation +After `bundle`, install the Javascript library: + +```bash +$ bin/yarn install @minthesize/futurism +``` + +In your `app/javascript/channels/index.js`, add the following + +```js +import * as Futurism + +import consumer from './consumer' + +Futurism.initializeElements() +Futurism.createSubscription(consumer) +``` + ## Contributing ## License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). @@ -73,13 +107,15 @@ <table> <tr> <td align="center"><a href="http://www.julianrubisch.at"><img src="https://avatars0.githubusercontent.com/u/4352208?v=4" width="100px;" alt=""/><br /><sub><b>Julian Rubisch</b></sub></a><br /><a href="https://github.com/julianrubisch/futurism/commits?author=julianrubisch" title="Code">💻</a></td> <td align="center"><a href="https://github.com/darkrubyist"><img src="https://avatars2.githubusercontent.com/u/11207292?v=4" width="100px;" alt=""/><br /><sub><b>darkrubyist</b></sub></a><br /><a href="https://github.com/julianrubisch/futurism/commits?author=darkrubyist" title="Code">💻</a> <a href="https://github.com/julianrubisch/futurism/commits?author=darkrubyist" title="Documentation">📖</a></td> <td align="center"><a href="https://ParamagicDev.github.io/portfolio"><img src="https://avatars2.githubusercontent.com/u/26425882?v=4" width="100px;" alt=""/><br /><sub><b>Konnor Rogers</b></sub></a><br /><a href="https://github.com/julianrubisch/futurism/commits?author=ParamagicDev" title="Code">💻</a></td> + <td align="center"><a href="https://www.andrewm.codes"><img src="https://avatars1.githubusercontent.com/u/18423853?v=4" width="100px;" alt=""/><br /><sub><b>Andrew Mason</b></sub></a><br /><a href="#maintenance-andrewmcodes" title="Maintenance">🚧</a></td> + <td align="center"><a href="http://gorails.com"><img src="https://avatars1.githubusercontent.com/u/67093?v=4" width="100px;" alt=""/><br /><sub><b>Chris Oliver</b></sub></a><br /><a href="https://github.com/julianrubisch/futurism/commits?author=excid3" title="Code">💻</a> <a href="https://github.com/julianrubisch/futurism/pulls?q=is%3Apr+reviewed-by%3Aexcid3" title="Reviewed Pull Requests">👀</a></td> </tr> </table> <!-- markdownlint-enable --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END --> -This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! \ No newline at end of file +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!