{"id":13400856,"url":"https://github.com/jsdf/sprockets-coffee-react","last_synced_at":"2025-04-09T11:12:26.998Z","repository":{"id":17683654,"uuid":"20489533","full_name":"jsdf/sprockets-coffee-react","owner":"jsdf","description":"DEPRECATED – Sprockets preprocessor for CJSX (Coffeescript with React JSX markup)","archived":false,"fork":false,"pushed_at":"2016-10-03T07:22:26.000Z","size":67,"stargazers_count":85,"open_issues_count":6,"forks_count":29,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T02:55:50.336Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/jsdf.png","metadata":{"files":{"readme":"README.rdoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-04T15:42:32.000Z","updated_at":"2023-03-08T03:16:40.000Z","dependencies_parsed_at":"2022-07-13T04:31:31.978Z","dependency_job_id":null,"html_url":"https://github.com/jsdf/sprockets-coffee-react","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsdf%2Fsprockets-coffee-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsdf%2Fsprockets-coffee-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsdf%2Fsprockets-coffee-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsdf%2Fsprockets-coffee-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsdf","download_url":"https://codeload.github.com/jsdf/sprockets-coffee-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248027411,"owners_count":21035594,"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","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":[],"created_at":"2024-07-30T19:00:56.334Z","updated_at":"2025-04-09T11:12:26.926Z","avatar_url":"https://github.com/jsdf.png","language":"Ruby","readme":"= sprockets-coffee-react\n\n= STATUS: DEPRECATED\n\nThis tool is no longer maintained. If you need to transition your codebase from\nit, a codemod is available to do so: {cjsx-codemod}[https://github.com/jsdf/cjsx-codemod]\n\nThis project started as a way for me to explore how JSX could fit into\nCoffeescript syntax, as a quickly hacked together prototype. While I never\nreally promoted it, it quickly took on a life of its own, and before long people\nwere asking for it to support all kinds of different use cases. On top of that I\nhad no experience writing parsers, so the result is something with \n{insurmountable limitations}[https://github.com/jsdf/coffee-react/issues/32].\n\nAs I eventually stopped using Coffeescript I ended up neglecting this project,\nbut as people were using it I didn't want to kill it. I really should have,\nhowever, because it meant that people were using a crappy, ill-conceived,\nunmaintained tool. Now, long overdue, I'm putting it out to pasture.\n\nOriginal readme follows:\n\n== Compatibility\nsprockets-coffee-react 2.x is compatible with react ^0.12.0\n\nsprockets-coffee-react 0.x is compatible with react \u003c=0.11.0\n\n== How to use\n\nAdd this to your Gemfile:\n\n  gem 'sprockets-coffee-react'\n\nPlace a \u003ctt\u003e.js.coffee.cjsx\u003c/tt\u003e or \u003ctt\u003e.js.cjsx\u003c/tt\u003e file, or a \u003ctt\u003e.js.coffee\u003c/tt\u003e \nfile in your assets directory. When you require it into other JS files the CJSX\nmarkup will be transformed and compiled to Javascript.\n\nEg. if you have a file called \u003ctt\u003emy-component.js.coffee\u003c/tt\u003e which contains \nsome CJSX code, require it from \u003ctt\u003eapplication.js\u003c/tt\u003e or somewhere else:\n\n  //= require my-component\n\n== How to use with a Rack application\n\nIf you're not using rails, you'll need to register the Sprockets preprocessor manually. Here is an \nadapted version of the Rack example provided by Sprockets, which additionally requires and registers \nthe sprockets-coffee-react engine:\n\n  require 'sprockets'\n  require 'sprockets/coffee-react'\n  map '/assets' do\n    environment = Sprockets::Environment.new\n    environment.append_path 'app/assets/javascripts'\n    environment.append_path 'app/assets/stylesheets'\n    environment.register_preprocessor 'application/javascript', Sprockets::CoffeeReact\n    environment.register_engine '.cjsx', Sprockets::CoffeeReactScript\n    environment.register_engine '.js.cjsx', Sprockets::CoffeeReactScript\n    run environment\n  end\n\n  map '/' do\n    run YourRackApp\n  end\n\n== License\n\nReleased under the MIT License.  See the LICENSE file for further details.\n\n== How to use with Middleman\n\nAdd the following to your config.rb file:\n\n  require 'sprockets/coffee-react'\n\n  ::Sprockets.register_preprocessor 'application/javascript', ::Sprockets::CoffeeReact\n  ::Sprockets.register_engine '.cjsx', ::Sprockets::CoffeeReactScript\n  ::Sprockets.register_engine '.js.cjsx', ::Sprockets::CoffeeReactScript\n  \n  \n\n\n","funding_links":[],"categories":["Uncategorized","Awesome React","React [🔝](#readme)"],"sub_categories":["Uncategorized","Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsdf%2Fsprockets-coffee-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsdf%2Fsprockets-coffee-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsdf%2Fsprockets-coffee-react/lists"}