{"id":15405836,"url":"https://github.com/elia/receptive","last_synced_at":"2025-08-25T23:03:49.505Z","repository":{"id":66505087,"uuid":"121500859","full_name":"elia/receptive","owner":"elia","description":"The perfect toolkit to lighten up your existing HTML","archived":false,"fork":false,"pushed_at":"2024-01-28T19:11:35.000Z","size":28,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T20:59:29.549Z","etag":null,"topics":["javascript","jquery","opal","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-02-14T11:00:51.000Z","updated_at":"2024-02-06T15:19:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9c19377-8ce9-4ac7-b94e-6658376edddb","html_url":"https://github.com/elia/receptive","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/elia/receptive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Freceptive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Freceptive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Freceptive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Freceptive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elia","download_url":"https://codeload.github.com/elia/receptive/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Freceptive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272077678,"owners_count":24869288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","jquery","opal","rails","ruby"],"created_at":"2024-10-01T16:18:44.478Z","updated_at":"2025-08-25T23:03:49.480Z","avatar_url":"https://github.com/elia.png","language":"JavaScript","readme":"# Receptive\n\nReceptive is a toolkit that will help you add behavior to your existing, server-generated HTML. It's not intended for single-page-application but rather about taking care of specific DOM nodes.\n\nThis is perfect for you if:\n\n- **you already generate all your views from the server** (and don't want to throw everything away following the latest JavaScript fad)\n- **you need your site to work without JavaScript** for SEO or any other reasons\n- **you have a bunch of jQuery stuff around** and always wanted to organize it properly\n- **you like Ruby** and don't want to get caught by all the subtle quirks of JavaScript\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'receptive'\n```\n\nAnd then execute:\n\n    $ bundle\n\n\n## How it works\n\nJust keep your HTML as it is:\n\n```html\n\u003cdiv class=\"hello-world\"\u003e\n  \u003cinput type=\"text\"\u003e\n  \u003cbutton\u003eGreet\u003c/button\u003e\n  \u003cspan class=\"output\"\u003e\u003c/span\u003e\n\u003c/div\u003e\n```\n\nThen write a view with a reference to it:\n\n```rb\nclass HelloWorld\n  extend Receptive::View\n  self.selector = \".hello-world\"\n\n  on(:click, 'button') do |event|\n    @greeting_text = find('input').text\n    render!\n  end\n\n  def self.render\n    find('.output').text = @greeting_text\n  end\nend\n```\n\nRead on in the [handbook](./HANDBOOK.md)\n\n## Other features\n\n- script[async] compatible\n- pjax/turbolinks compatible\n\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/elia/receptive.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felia%2Freceptive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felia%2Freceptive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felia%2Freceptive/lists"}