Skip to content

sbsoftware/crumble-stimulus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crumble-stimulus

Seamless integration of stimulus.cr into crumble, providing a JS module that automatically includes all your Stimulus::Controllers and can be easily added to your template.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      crumble-stimulus:
        github: sbsoftware/crumble-stimulus
  2. Run shards install

Usage

# or wherever your Stimulus controllers are
require "./stimulus_controllers/*"
# make sure this comes after you required all controllers you want to include, otherwise they'll be missing
require "crumble-stimulus"

In your template:

html do
  head do
    # [...]
    script Crumble::StimulusControllers
    # [...]
  end
end

And that's it!

About

Seamless integration of stimulus.cr into crumble

Resources

License

Stars

Watchers

Forks

Packages

No packages published