Can you give any direction on how to integrate Tabler with the Rails Asset Pipeline? Tabler is using requirejs which i ran into some issues with the asset pipeline in rails.
What js file are absolutely required? I think anyone integrating tabler with any web framework will have the same question actually.
thanks @drale2k for feedback. I don't have a lot of experience with RoR, so it's hard topic for me.
I would like to make single css and js file with all features and second version with "must have" js files.
If you would like to give me tips how to do it best I will be grateful.
Hi, the main issue i am fighting with right now with integrating Tabler with rails is linking to assets within js files like Tabler does in dashboard.js using require.
Frameworks like Rails, Laravel etc all have their own folder where to put assets and helpers to link to those assets to make it work with the frameworks routing. Using relative paths inside js files as used in dashboard.js in the following example doesn't work.
paths: {
'core': 'assets/js/core',
'jquery': 'assets/js/vendors/jquery-3.2.1.min',
'bootstrap': 'assets/js/vendors/bootstrap.bundle.min',
'sparkline': 'assets/js/vendors/jquery.sparkline.min',
'selectize': 'assets/js/vendors/selectize.min',
...
I think the easiest will be for me to not use requireJS but include the required files separately. Am i right that the only files needed on all pages are:
dashboard.css
dashboard.js
core.js
And additionally i will have to define the __colors__ property on __window.tabler__ manually. I will have to try and see anyway but it would help if you point out anything i missing.
Thanks
I'm working on a simple Rails engine here based off the Bootstrap 4 rubygem.
Work in progress but feel free to pull request.
My gem now allows for usage of Tabler styles and javascript (without the use of requirejs) in Rails.
It also allows for modularized usage 脿 la the Bootstrap rubygem.
It's fully functional right now but could use some pull-requests to allow for the customization and synchronization of colors between the SCSS variables and the window.tabler JS global.
tabler-rubygem v0.1.1 is now released.
Nice work @lightyrs - if you want you can host the repo under the Tabler org :)
@lightyrs awesome, will switch to the gem today and report any issues. Thanks!
@beeman Sounds good. Let me know what we need to do to make that happen.
@beeman @codecalm Any interest in adding tabler-rubygem to the org? I'd like to do that for the sake of the ecosystem, especially since it's getting a lot of traction today from Product Hunt.
kudos on tabler. Also kudos to @lightyrs on the rails gem.
tabler-rubygem v0.1.2 is now released.
tabler-laravel is now released
Most helpful comment
tabler-rubygem v0.1.2 is now released.