-
-
Notifications
You must be signed in to change notification settings - Fork 627
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
Have generator create application.js file if not found #108
Conversation
a0708de
to
cbb5717
Compare
else | ||
puts_setup_file_error("#{application_js} or #{application_js}.coffee", data) | ||
create_file(app_js_path, data << "\n\n//= require turbolinks\n\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add turbolinks? It's not a requirement of react_on_rails. We support it, but don't necessarily encourage it.
I'd say remove this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@justin808 roger that, makes sense
cbb5717
to
d8b491a
Compare
@justin808 this should be good to go pending a final review |
@robwise This looks fine so long as it's well tested. Let me know and I'll merge. |
@justin808 yep, the important part of the associated test is here: https://github.com/shakacode/react_on_rails/pull/108/files#diff-dd34ce0d9a02be7e957b081e5d11cb7cR146 since it doesn't create an existing application.js like it usually does, and yet the file still shows up as expected as running the generator. |
a21916d
to
c6d122e
Compare
Fixes #78 Generator used to put a setup error message when it did not find application.js. Now, it will simply just create one with the necessary data in it. Note that we don't generate a turbolinks sprockets requirement if we create the file for the user since this is not really related to implementing React on Rails. Users should add this manually if they want turbolinks.
c6d122e
to
f8999d0
Compare
Have generator create application.js file if not found
Fixes #78
Generator used to put a setup error message when it did not find
application.js. Now, it will simply just create one with the
necessary data in it.