Тёмный

Ruby on Rails - How to Use Import Maps 

Mix & Go
Подписаться 7 тыс.
Просмотров 11 тыс.
50% 1

Опубликовано:

 

31 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 39   
@muronuck
@muronuck 2 года назад
You are simply the best, these videos have been instrumental for the Rails 7 learning curve. Thank you so much Cezar, keep them coming!
@mixandgo
@mixandgo 2 года назад
It's a pleasure. Thank you.
@asgerwolff9992
@asgerwolff9992 2 года назад
Love the Rails 7 content, looking forward to your new course Cezar!
@mixandgo
@mixandgo 2 года назад
Thanks Asger, I'm working on it.
@ppavelcars
@ppavelcars Год назад
Amazing video! Thank you!
@mixandgo
@mixandgo Год назад
Glad you like it
@ethancane
@ethancane 2 года назад
Excellent overview. Thanks
@mixandgo
@mixandgo 2 года назад
Glad you enjoyed it!
@ricardomordaunt1101
@ricardomordaunt1101 2 года назад
Thank you..very helpful..
@mixandgo
@mixandgo 2 года назад
Glad you find it useful
@dencam
@dencam 2 года назад
Thank you for the awesome video!
@mixandgo
@mixandgo 2 года назад
Thank you
@danimusbar
@danimusbar 2 года назад
Autosubs, I am looking for tuts rails like this for my dev project, tks Sir, keep up ...
@mixandgo
@mixandgo 2 года назад
Happy to help
@ledockol
@ledockol 2 года назад
👏Thanks!
@mixandgo
@mixandgo 2 года назад
You're welcome
@velsvels701
@velsvels701 Год назад
hi I am using my raw custom coded js in assets/javascripts/xx.js, when I imported jquery using importmap, its showing like "jQuery is not defined" in my custom js file, any idea to fix them?
@mixandgo
@mixandgo Год назад
It sounds like you're looking for a jQuery global object? You could have something like this: import $ from "jquery"; jQuery = $; but it should probably be something like this: window.$ = window.jQuery = $; I hope that helps.
@velsvels701
@velsvels701 Год назад
is it possible to use raw js without need of import statements?
@mixandgo
@mixandgo Год назад
@@velsvels701 I don't really know what you mean by that. That's basically how Javascript works. If you want to access an object/function from a different file (or library), you have to import it. Otherwise how would it know it exists?
@velsvels701
@velsvels701 Год назад
@@mixandgo In some scenario, I need to use added my custom scripts for my project, when I used jquery using importmap, It wants me to convert code like added my custom scripts for my project, if I have 100 files then I need to replace all of them right? are there any workaround to fix that?
@mixandgo
@mixandgo Год назад
@@velsvels701 it's hard for me to give any advice based on what I think the code looks like. So I'm not sure. Sorry, I know that's not helpful.
@JarmamStuff
@JarmamStuff 2 года назад
Rails 7 really feels like a major step in the right direction to keep Rails feel modern. Bundler config hell is all too real
@mixandgo
@mixandgo 2 года назад
Haven't had any issues with bundler in years. Did you?
@JarmamStuff
@JarmamStuff 2 года назад
@@mixandgo Yes, unfortunately I spent several days trying to unwind a mish-mash of configs in a shakapacker+Vue on Rails + Yarn 1.something or other outdated-version recently. I cant wait to give this a go, looks brilliant
@mixandgo
@mixandgo 2 года назад
@@JarmamStuff oh, you meant asset bundler, not Bundler. Yeah, moving away from those nasty configs is a blessing.
@stringplayer999
@stringplayer999 Год назад
Has anyone found a clean way to download a private npm package as an import map?
@danimusbar
@danimusbar 2 года назад
Perhaps You can make full tutorial step by step for beginner make website with rails and full with bootstrap or css such as website about gym website with membership or others, and probably You can publish into freecodecamp
@mixandgo
@mixandgo 2 года назад
If you want to learn in a tutorial/step-by-step way, check out my course: bit.ly/3P62jhq
@peytonsterling2497
@peytonsterling2497 2 года назад
Funny you talk about webpacker hell. I never wasted much time with webpacker - I'm on hour 6 of getting bootstrap to work with importmaps. THAT'S what I'd call hell.
@mixandgo
@mixandgo 2 года назад
What seems to be the problem?
@peytonsterling2497
@peytonsterling2497 2 года назад
@@mixandgo the new `--css=bootstrap` has worked a dream for setting up bootstrap CSS. On the other hand, none of bootstrap's JavaScript features are working. I've tried several sets of instructions on setting up rails 7 with bootstrap, but none have given me working JS. I'm convinced there is something wrong with my setup, as I have to manually set up importmaps (which some of the instructions suggest it is added by default) and then I end up with conflicting application.js files. I have one in app/javascript/ and one in app/assets/build/. I'm currently reinstalling everything hoping that will fix it.
@mixandgo
@mixandgo 2 года назад
@@peytonsterling2497 well the `--css=bootstrap` option installs esbuild instead of importmaps. So once you have esbuild, there's no point in trying to install importmaps. The purpose of importmaps is so you don't bother with of the JS bundling stuff.
@mixandgo
@mixandgo 2 года назад
Here's a quick test, I just created a new Rails app using --css=bootstrap share.cleanshot.com/DsrTI1 (I used the modal example from the bootstrap docs) didn't change anything else.
@peytonsterling2497
@peytonsterling2497 2 года назад
@@mixandgo It's becoming more and more clear to me, that I have no idea what I am doing :') forgive me if this is obvious: if i want to use importmaps, I should not use the --css flag and manually add bootstrap? Thanks for your time
@danielleedottech
@danielleedottech 2 года назад
Wow, great video!
@mixandgo
@mixandgo 2 года назад
Thank you Daniel
Далее
Introduction to Hotwire in Ruby on Rails
10:17
Просмотров 21 тыс.
New Javascript Feature: Import Maps Explained!
14:34
Просмотров 3,1 тыс.
Incredibox Sprunki in geometry dash
00:19
Просмотров 3,7 млн
Avaz Oxun - E'lon, erga tegaman!!!
11:47
Просмотров 414 тыс.
Alpha preview: Using React with importmaps on Rails 7
13:29
I DONT USE NEXT JS
54:01
Просмотров 372 тыс.
Hotwire Demystified - Jamie Gaskins
34:18
Просмотров 11 тыс.
How to use ESBuild with JS Bundling in Rails
15:07
Просмотров 15 тыс.
Is ViewComponent the Future of Rails?
12:25
Просмотров 7 тыс.
How to use Hotwire in Rails
24:26
Просмотров 56 тыс.
Moving away from importmaps to esbuild in Rails 7
9:27
Incredibox Sprunki in geometry dash
00:19
Просмотров 3,7 млн