] & echo "argument error: bss export directory required" & exit 1 #!/bin/sh TARGET =~/path/to/rails/app/assets/javascripts/components_rt Use this one and change the TARGET to your needs: Install the rt command from react-templates: You also need to add an import line for it right before the import line of the components directory in app/assets/javascripts/application.js.coffee: Add react-rails to your rails application, see github page for details.Ĭreate an additional directory components_rt under app/assets/javascripts of your rails application for the template files.Since BSS can run a custom export script each time I hit the export button, this process can be automated. So the idea is to export the BSS page to html, transform it to a React template, which is a Javascript function, and use that function as React's render function in a component. I recently integrated React into my Rails app and that was just about the right decision, because a company called WIX has written react-templates, which provides a way to wrap a BSS export into a React component. Since I liked the idea of using it for building my Rails web application, I was wondering if there's a better way to use it than manually copy-and-pasting HTML and CSS code from BSS's export. It's not free, but at least the price tag is not very high. The latest version features support for Bootstrap 4 and includes a migration function for converting Bootstrap 3 projects to Bootstrap 4. Do you know Bootstrap Studio? It's a graphical HTML/Bootstrap builder.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |