Sha256: 765bb668fa4ace186862567d82e4d954dcd384f87a6d8fe236565c2205ebe373
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
# stimulusjs-rails [![Gem](https://img.shields.io/gem/v/stimulusjs-rails.svg)](https://rubygems.org/gems/stimulusjs-rails) [![Gem](https://img.shields.io/gem/dt/stimulusjs-rails.svg)](https://rubygems.org/gems/stimulusjs-rails) ## About Rails 4.2+ asset-pipeline gem to provide Stimulus.js ## Package Versions - Stimulus 1.1.1 - Stimulus 1.0.1 ## Setup Have in your `Gemfile`: ```ruby gem 'stimulusjs-rails', '~> 1.1.1' ``` And in your `application.js` manifest: ```js //= require stimulus window.application = Stimulus.Application.start() ``` ## Example Add in your `application.js` ```js //= require controllers/hello_controller ``` and in `controllers/hello_controller.es6` ```js window.application.register('hello', class extends Stimulus.Controller { static get targets() { return [ "name" ] } // … }) ``` ## Tips See this for Sprocket + ES6 support: https://github.com/rails/sprockets#es6-support ## Contributing Contributions are welcome, please follow [GitHub Flow](https://guides.github.com/introduction/flow/index.html) ## License [MIT](LICENSE.md)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
stimulusjs-rails-1.1.1 | Readme.md |