@cable_ready/alpine_morph

5.0.0 • Public • Published

Package @cable_ready/alpine_morph

The Alpine.morph() function as a CableReady custom operation meant to be used with cable_ready.

Installation

Install @cable_ready/alpine_morph in your application:

yarn add @cable_ready/alpine_morph

# or

npm install --save @cable_ready/alpine_morph

Usage

Add the Alpine morph operation to CableReady:

// app/javascript/packs/application.js

import CableReady from 'cable_ready'
import AlpineMorph from '@cable_ready/alpine_morph'

CableReady.addOperations(AlpineMorph)

And configure CableReady on the Ruby-side to include the new operation:

# config/initializers/cable_ready.rb

CableReady.configure do |config|
  config.add_operation_name :alpine_morph
end

Known Issues

  • Just works for selector morphs (Alpine doesn't like to morph the whole body element, which is used in page morphs)

Readme

Keywords

none

Package Sidebar

Install

npm i @cable_ready/alpine_morph

Weekly Downloads

0

Version

5.0.0

License

MIT

Unpacked Size

4.53 kB

Total Files

6

Last publish

Collaborators

  • hopsoft
  • marcoroth
  • julianrubisch
  • cableready-bot