Skip to content

joerodrig/cocoon-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cocoon-js

Contains the Javascript dependency for the cocoon rubygem.

Why

The existing gem has a dependency on JQuery that requires you loading JQuery manually via the asset pipeline. JQuery is no longer added by default in Rails 5, and manually adding it back breaks some rails-ujs functionality. This package contains the cocoon.js code, and installs jQuery via npm

How to use

  • Install the [cocoon] rubygem as usual
  • In a JS file that relies on the cocoon javascript, import cocoon-js at the top of the file

For example, if you're using webpacker and have an application.js entrypoint, you can do:

// app/javascript/packs/application.js
import "cocoon-js";
...

About

Webpacker compatible cocoon code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published