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
Bootstrap as an option for generator #119
Conversation
@robwise Please take a look at this and see if this should go into v1.1.0. |
# --bootstrap | ||
class_option :bootstrap, | ||
type: :boolean, | ||
default: false, |
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.
I talked to @justin808 and he said he'd prefer if this would default to true
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.
@robwise let me make it default to true
@justin808 I will let this PR pass build today.
5b345de
to
a951d1c
Compare
@justin808 I think it's ready with correct functions and testings. The only concern for now is to document acordingly, but I am not sure where and how to do that correctly. Please take that document thing in mind before merging to your master. |
@robwise I'll let you take a first review at this, then I'll review. |
@robwise Let's try to get this wrapped up tomorrow. I'd like to push a version of the generator diffs (prs) to take a look at going basic -> basic + bootstrap. |
@@ -128,7 +128,7 @@ In most cases, you should use the `prerender: false` (default behavior) with the | |||
|
|||
Now the server will interpret your JavaScript using [ExecJS](https://github.com/rails/execjs) and pass the resulting HTML to the client. We recommend using [therubyracer](https://github.com/cowboyd/therubyracer) as ExecJS's runtime. The generator will automatically add it to your Gemfile for you. | |||
|
|||
Note that **server-rendering requires globally exposing your components by setting them to `global`, not `window`** (as is the case with client-rendering). If using the generator, you can pass the `--server-rendering` option to configure your application for server-side rendering. | |||
Note that **server-rendering requires globally exposing your components by setting them to `global`, not `window`** (as is the case with client-rendering). If using the generator, you can pass the `--server-rendering` option to configure your application for server-side rendering. |
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 @yorzi this may be a little unclear, as it makes it sound as though we don't need to expose components to window when server rendering. We still need to do that, just in addition we need to expose to global.
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.
@robwise I think this doc is not supposed to be updated in this branch. It might because my editor removes an space here.. anyway, can you or @justin808 do this doc updates accordingly?
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.
Just a couple of comments, the biggest thing being using @yorzi All in all, a very good job—I'm delighted to see that you were able to read the code and change things exactly how they should have been, and without any help! I also liked how you refactored the bootstrap examples tests. |
@robwise when you're ready for me to do a final review after you have generated the PR of basic to basic + bootstrap, let me know. |
@justin808 I'm just confused as to what we are recommending the user should be doing when using stylesheets without bootstrap. Can they just use them the normal way you would for a Rails app where they go in |
@robwise good points! I've updated README to include some more explanation for bootstrap option. You or @justin808 can help to reword it with more details if needed. |
@yorzi Great job!
|
22a27ef
to
0ce52c2
Compare
@justin808 what do you mean by "rebase down to a nice commit with a nice message" here? @robwise can you help with the generator results or would you let me know how to do that with your script? |
@yorzi As for the generators, all you need to do is go to |
@justin808 oh, I do know the way to rebase and combine commits/logs, so you want me to combine these commits with better git logs, right? |
Please combine to one commit with nice description that I can use in the change log. |
@robwise your guide is to test dummy app, but @justin808 asked for a generator results for diff from here: https://github.com/shakacode/react_on_rails-generator-results . Do I understand something incorrectly? |
@yorzi You're absolutely right, I misunderstood. I went ahead and took the liberty of modifying my little generator script to generate an app that uses your new option so that we can look at the diffs. Check it out here: Specifically, here is a comparison of running the generator with the default options versus passing in your new It looks good to me, what about you? |
Also I configured rake to generate an example app for you in a branch based off of your changes: https://github.com/shakacode/react_on_rails/blob/bootstrap-as-an-option/rakelib/examples_config.yml#L18 It would probably be easiest if you just manually made this change in your own branch |
…you don't need bootstrap related files and regarding configuration.
@robwise 👍 and I added that configuration for sample app . |
Bootstrap as an option for generator
Really busy in whole last week, only start to have some time for #96
It's not fully ready yet. But I hope to have this PR submitted for people to review and give me feedback, so that I am able to make it better. I still need to adjust/add some rspec testings.