Skip to content

#WIP - attempt to parse Slim instead of Html in jsx #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

reneweteling
Copy link

  • Listen to a new extension handler if slim is used probably .js.jsx.slim.coffee
  • Parse the slim into html
  • Take care of the class attribute --> className attribute

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@rmosolgo
Copy link
Member

Wow, this would be quite a feat! However I think a dependency on Slim is outside the scope of react-rails.

The master branch has a nice extensibility point for this, though. You could define your own transformer class add assign it to JSX.transformer_class: https://github.com/reactjs/react-rails/blob/master/lib/react/jsx.rb#L10-L14

What do you think of that?

If you end up making it work, I'd be happy to add an "add-ons" page to the Wiki & include this project as the first entry :)

@reneweteling
Copy link
Author

@rmosolgo nice one! took me a while before i noticed its not in the gem but on the master :) but im playnig with it thanks for the heads up

@rmosolgo
Copy link
Member

Yeah, hoping to cut a new version soon, but waiting for rails/sprockets-rails#257

@rmosolgo
Copy link
Member

Please do let me/us know if it comes together, it would be great to add a reference on this project somewhere!

@rmosolgo rmosolgo closed this Jun 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants