Skip to content

Fixing install generator to have inserted content properly on the new Line #476

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

Merged

Conversation

akshaymohite
Copy link
Contributor

When used rails g react:install, it generated modified application.js as given below.

//
 //= require jquery
 //= require jquery_ujs
-//= require turbolinks
+//= require turbolinks//= require react
+//= require react_ujs
+//= require components
+

Made changes to have inserted content on the new line.

@akshaymohite
Copy link
Contributor Author

Taking a look at failing specs.

@akshaymohite akshaymohite changed the title Fixing install generator to have inserted content properly on the new Line [WIP] Fixing install generator to have inserted content properly on the new Line Feb 12, 2016
@rmosolgo
Copy link
Member

Thanks, this will be a great fix!

We just changed this code but I guess we missed a spot 😬

@imogenkinsman
Copy link

👍 ran into this as well and was about to make a PR

… line.

- Added new line matcher regex (\s+\n) in inject_react for inserting after turbolinks.
- Modified tests to check new lines in the inserted content from install_generator.
@akshaymohite akshaymohite force-pushed the fix-install-generator-for-new-lines branch from 12a55fc to cdf292f Compare February 17, 2016 04:55
@akshaymohite
Copy link
Contributor Author

@rmosolgo fixed failing specs. Build is green now.

@akshaymohite akshaymohite changed the title [WIP] Fixing install generator to have inserted content properly on the new Line Fixing install generator to have inserted content properly on the new Line Feb 17, 2016
@rmosolgo
Copy link
Member

Thanks for the fix!

rmosolgo pushed a commit that referenced this pull request Feb 18, 2016
…ew-lines

Fixing install generator to have inserted content properly on the new Line
@rmosolgo rmosolgo merged commit 76eb7e2 into reactjs:master Feb 18, 2016
@akshaymohite
Copy link
Contributor Author

👍

@akshaymohite akshaymohite deleted the fix-install-generator-for-new-lines branch February 19, 2016 04:19
@rmosolgo
Copy link
Member

🚢 in 1.6.1, thanks!

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