Gulp v4 - Sass and BrowserSync setup

Sdílet
Vložit
  • čas přidán 19. 02. 2019
  • In this video I look at how we can setup a gulp build that will compile Sass for us, and automatically sync all changes to html, sass files, and JS files, on save using BrowserSync. Save your file, and the page is updated. So nice!
    If you're coming from a previous version of Gulp, you may have noticed that the upgrade to v4 brought in some breaking changes, which is never fun. Instead of creating tasks, we now create functions, but other than that most things are still the same luckily :)
    ---
    Come and hangout, ask questions, suggest ideas, and meet some awesome people over in The Community: / discord
    I have a newsletter! www.kevinpowell.co/newsletter
    New to Sass, or want to step up your game with it? I've got a course just for you: www.kevinpowell.co/learn-sass
    ---
    My Code Editor: VS Code - code.visualstudio.com/
    How my browser refreshes when I save: • How to automatically r...
    ---
    Support me on Patreon: / kevinpowell
    I'm on some other places on the internet too!
    If you'd like a behind the scenes and previews of what's coming up on my CZcams channel, make sure to follow me on Instagram and Twitter.
    Instagram: / kevinpowell.co
    Twitter: / kevinjpowell
    Codepen: codepen.io/kevinpowell/
    Github: github.com/kevin-powell

Komentáře • 396

  • @alexmachin1785
    @alexmachin1785 Před 4 lety +4

    Awesome job Kevin :) Your the only person to cover the new version of Gulp.
    After watching your video I was able to redeploy my portfolio to Netlify using the latest version of Gulp.
    Gulp is not that difficult, I noticed the only difference is that tasks now become functions and the functions need to be exported. Pretty straight forward to even add ecmascript support for the javascript task too.
    Again great job and I can't wait to see more videos of yours :)

  • @DavidElstob73
    @DavidElstob73 Před 4 lety +4

    Kevin is the best teacher on CZcams. Never a wasted word - always precise, clear and informative. Thank you. :)

  • @akosan
    @akosan Před 5 lety +16

    I can't thank you enough, Kevin. You save my job today! Greetings from a fan in Chile :)

  • @duckburgz
    @duckburgz Před 5 lety +3

    Thank you Kevin! I was diving back into Gulp and was getting lost with some of the new changes. This video definitely helped!

  • @TOMA21207
    @TOMA21207 Před 2 lety +4

    After almost 3 years it is still the great starting point for everyone who's new to this. Thank you so much for creating this easy to follow tutorial. Keep up the good work.

  • @stanislavyatskov1740
    @stanislavyatskov1740 Před 4 lety +1

    Great stuff, man! Wonderful, got my browserSync up and running right away on the first attempt while watching this tutorial. Awesome way of explanation commenting every line of code on new and potentially complicated methods/objects!

  • @MrMerfman
    @MrMerfman Před 4 lety +2

    I've been troubled with Gulp for too long, this has SAVED me. Thankyou!

  • @steven-vj6lc
    @steven-vj6lc Před 5 lety

    Thank you so much man! I searched Google for a simple tutorial and yours was along the BEST of all the articles that I could find that could easily break down Gulp v4 to a complete beginner. Once again thanks man!

  • @arturoperezmendizabal758
    @arturoperezmendizabal758 Před 4 lety +1

    I had a lot of problems searching for a new gulp's version tutorial and you explained it in a cool way. Thanks a lot!!!

  • @carstenwendelnielsen9433
    @carstenwendelnielsen9433 Před 4 lety +1

    It's a really good lesson you've done there. I have struggled with the book I started after is an old version of Gulp, and now the syntax has changed from Gulp 4.0 Thank you from Carsten in Denmark

  • @chrisjones469
    @chrisjones469 Před 4 lety +1

    Awesome tutorial!!! I was working through some other tutorials that were giving me grief because the dev environment wasn't working correctly. The version changes in Gulp were to blame, and your video helped me correct it in a few minutes. Thanks again!

    • @KevinPowell
      @KevinPowell  Před 4 lety

      That change to v4 was a killer! Glad I could help though.

  • @SimPwear84
    @SimPwear84 Před 3 lety

    Amazing stuff!! Haven't used Gulp in ages and was struggling with version 4. You cleared all the doubts, thank mate.

  • @raphaelgracia551
    @raphaelgracia551 Před 4 lety +3

    You're a natural teacher. Thanks for the level of detail.

  • @bandarabdullah40
    @bandarabdullah40 Před 4 lety

    You saved my day!
    I'm trying to use gulp with WordPress and unfortunately, there's a lot of old tutorials that only gave me bugs, but your tutorial is the perfect one! Thank you so much!

  • @konstantinkkk8397
    @konstantinkkk8397 Před 5 lety

    thank you! soon your tutorials will become one of the most popular because your explanation is great!

  • @manassengudia1854
    @manassengudia1854 Před 4 lety +2

    God job @Kevin Powel, I had trouble deploying the Gulp 4 with browser-sync, now I find the solution! Thanks a lot!

  • @niconel7659
    @niconel7659 Před rokem

    Thank you! So many useless / confusing vids on this topic on YT, yours saved my day

  • @kaydrum9377
    @kaydrum9377 Před 2 lety +1

    Thank a lot Kevin. You saved my life. You're creating amazing videos!

  • @yaldakarimi3772
    @yaldakarimi3772 Před 4 lety

    This seriously is the best tutorial for gulp. You are great, thank you for teaching these amazing lessons.

  • @carstenwendelnielsen9433

    Hi Kevin Powell - this is a great video you have made about gulp sass. Super explanation and description. Thank you so much, I will follow your videos. Best regards from Carsten in Denmark

  • @julianhecker944
    @julianhecker944 Před 5 lety +2

    Thanks so much for uploading the gulpv4 tutorial, It’s been so difficult to set up gulp when all the existing tutorials are outdated!

    • @KevinPowell
      @KevinPowell  Před 5 lety +2

      I originally intended it to be with the old version. I didn't realize 4 had breaking changes, lol. Figured if I ran into the issue, many others probably were too!

  • @user-vg3hd1uq7j
    @user-vg3hd1uq7j Před 4 lety

    Hi from Russia (St.Petersburg),
    Thank you Kevin for the clear presentation of the material.
    Keep it up. I look forward from you to new interesting topics.

  • @edwardtofan1800
    @edwardtofan1800 Před 5 lety

    Hi Kevin!I was just thinking about you and Gulp 4 these days.Great video!Thanks for your help.

    • @edwardtofan1800
      @edwardtofan1800 Před 5 lety

      It's me again.I just started a project after watching your video and I have to thank you again because your video makes my life much much MUCH easier.Thanks a lot again!Can't wait to see the next video.

  • @danutzz8
    @danutzz8 Před 3 lety

    great stuff, just starting an internship, I have to use gulp and this video was real help...cheers!

  • @MontyKsycki
    @MontyKsycki Před 4 lety

    Wow!!! I've been meaning to find out more about Gulp and using scss/sass in my projects and this video did an AWESOME JOB explaining it!!! I've been using Express.js a lot and I think incorporating Gulp will help out a lot. Thank You for Sharing!!! Have a Great Day!!! ~ Peace :)

  • @swaroopkorde5810
    @swaroopkorde5810 Před 4 lety

    I've been troubled with Gulp for too long, this video helped me alot..thank you so much..

  • @RichardWertzIsGreat
    @RichardWertzIsGreat Před 5 lety

    Thanks for this. Last time I used browserSync, v3 was the latest version, and I didn't know why my environment was failing. Thanks for the intro and explanation of v4. It was very helpful!

    • @KevinPowell
      @KevinPowell  Před 5 lety

      Glad I could help! It took me a LONG while to realize why it wasn't working, lol. Not many tutorials out there mention v4 either, so it can be really frustrating.

  • @MuhsinunChowdhury
    @MuhsinunChowdhury Před 4 lety

    Thank you so much this was so helpful! I was messing around with gulp.series to figure out how to port my tasks from v3 to v4, but I was really struggling. This was a huge help!

    • @KevinPowell
      @KevinPowell  Před 4 lety

      I got so frustrated as well, and there was next to no info on it! Figured others would be running into the same problem as me. Glad I could help :D

  • @Morrile1
    @Morrile1 Před 5 lety

    I completed this yesterday after a few issues; the internet speed of 2mbps (where I was and could not be avoided) combined with a couple of typos on my part, yet amazed how this video simplifies everything :-) I have taken a huge leap forward in web design, thanks Kevin.

    • @KevinPowell
      @KevinPowell  Před 5 lety

      must have taken forever to install the npm packages 😫 - glad you got it working though!

  • @miku6701
    @miku6701 Před 3 lety

    Probably the best explanation out there on gulp

  • @chriscannon303
    @chriscannon303 Před rokem

    My old gulp file didn't work with my new setup and I had lost the original package.json file. This saved me a lot of head scratching. Thank you very much.

  • @jscardenasjr
    @jscardenasjr Před 3 lety

    I've watched 3 outdated gulp videos. Your video saved me!!! THank you!!!

  • @sathishshaj7815
    @sathishshaj7815 Před 5 lety

    As now this is the only updated video tutorial for gulp...thanks a lot and love your all video

  • @parate067
    @parate067 Před 4 lety +1

    Great explained Kevin. Thankyou so much.

  • @stanislavcodes
    @stanislavcodes Před 4 lety +1

    Thanks for very helpful tutorial, Kevin!

  • @Alekobeats
    @Alekobeats Před 5 lety +3

    Thank you for this tut, really helped me out.

  • @babitakc5683
    @babitakc5683 Před 3 lety

    i was tired by searching how to do bla bla bla and here is simple and easy way to understand the gulp :) A big Thank you for this tutorial

  • @d3struction61
    @d3struction61 Před 4 lety

    Extraordinary!
    Very clear and informative!
    Thanks!

  • @freestyleez1
    @freestyleez1 Před 5 lety

    thank you so much! Finally after many hours of trying to set watcher for my .php files, your tut show me how to do this.

  • @tonytony-fc6gq
    @tonytony-fc6gq Před 4 lety

    WOW!!! thanks very much , everything worked in 1 go on my crappy laptop , first ever tutorial with no hassle

  • @maxwellcarlscott
    @maxwellcarlscott Před 4 lety

    big time upvote... .this saved my butt... I had to work on a directory from years ago that was gulp 3.0, so hard to stay up on all this stuff sometimes.

  • @Akisan1998
    @Akisan1998 Před 3 lety

    Really nice tutorials, and this one is going to save me a lot of time forward in debugging.

  • @ZnSstr
    @ZnSstr Před 3 lety

    This is my first day with gulp and you made it easy, even tho I don't fully understand how gulp works but I will look out for a tutorial that will explain everything.

  • @samvanst
    @samvanst Před 4 lety

    Thanks for the vid! helped me alot to start with gulp and the understanding of browser sync !

  • @EmmanuelLemal
    @EmmanuelLemal Před 4 lety

    thanks a lot for this tutorial ! I was struggling to get BrowserSync to work with Gulp4 now it's working fine! After this video I was struggling to define the default task but found the solution which i share here: const { series } = require('gulp'); and then at the very bottom exports.default = series(watch);

  • @nikosspiropoulos8417
    @nikosspiropoulos8417 Před 3 lety

    Amazing tutorial for the hot reloading feature! Thank you very much!

  • @aldosoto4122
    @aldosoto4122 Před 4 lety

    Excellent tutorial, It helped me a lot to improve my template from gulp 3.9 to 4. Thanks amigo.

  • @b-o-t-l-y
    @b-o-t-l-y Před 4 lety

    Hi, Kevin! Thank you for your video! It's very better what I find in youtube.

  • @mertkaraman06
    @mertkaraman06 Před 4 lety

    One of the best tutorial video I have seen. Thanks

  • @salhakim2322
    @salhakim2322 Před 4 lety

    Really awesome tutorial Kevin. I'd love to see an extension of this video to see a semantic way of how you organize your sass files.

  • @maximeroudier7298
    @maximeroudier7298 Před 4 lety

    I joining all the ancient comment under this video to say thanks a lot. It was well and clearly explained so good job and thanks again !

  • @crooker2
    @crooker2 Před 5 lety +3

    Cmder is the most unbelievably amazing command line tool for Windows. :)

  • @albuadrian3658
    @albuadrian3658 Před 3 lety

    You did a very good job with this tutorial. Thank you very much!

  • @srs4738
    @srs4738 Před 4 lety

    I watched a lot of tutorial video but none of that worked. only this video is very easy and it working .thank you

  • @ADIYR
    @ADIYR Před 2 lety

    Thank you Kevin 🤙
    This really helped me

  • @salsaldare8585
    @salsaldare8585 Před 4 lety

    Great video. You got me up and running. Thanks Kevin

  • @sistemofe
    @sistemofe Před 4 lety +2

    i loved that tutorial. respect from Turkey

  • @jacquesgoudreau7594
    @jacquesgoudreau7594 Před 4 lety

    Great tutorial. Set up my project in no time ! Thanks!

  • @netgeek2392
    @netgeek2392 Před 4 lety

    Thanks Kevin, really helpful. You are a lifesaver.

  • @San_desh24
    @San_desh24 Před 4 lety +1

    Thank you so much!
    Great explanation

  • @meicerra
    @meicerra Před 4 lety

    The only vid on gulp 4 that actually worked for me. Ty.

  • @kazimsyed7367
    @kazimsyed7367 Před 3 lety

    i really appreciate your work, you are heavenly splendid

  • @eduardoherrera3696
    @eduardoherrera3696 Před 4 lety

    Thanks Kev! keep up the good work.

  • @gabrielfono844
    @gabrielfono844 Před 4 lety

    damn bro
    this huge
    I like it.
    you are doing amazing

  • @leslie6217
    @leslie6217 Před 5 lety +2

    Thanks for this. Good intro to gulp v4.

  • @Allformyequine
    @Allformyequine Před 5 lety

    Very happy you made this!! Thank you!!

  • @ande1986b
    @ande1986b Před 4 lety

    Thanks Kevin, you really helped me!

  • @lawrencethomas6520
    @lawrencethomas6520 Před 4 lety +1

    This worked great for me! Thanks!
    If anyone had trouble setting this up for wordpress you may need to replace your browserSync.init in the gulpfile.js with the following instead of
    server you need to use a port since in the tutorial the files are static.
    browserSync.init({
    port: 8888,
    proxy: "localhost:8888/yourThemeName/"
    });
    Also use this line instead of .html since the files are .php
    gulp.watch('./*.php').on('change', browserSync.reload);

    • @willia_music
      @willia_music Před 4 lety

      I see you wrote 'yourThemeName' but do you mean the whole WordPress website directory?

    • @willia_music
      @willia_music Před 4 lety

      I am so close. I changed to .html to php. i changed the browserSync.init to my port '80'. when i run gulp watch it throws up my website build. when i save any php file i see the terminal "Browsersync reloading' but my browser still doesn't refresh. Is there a final step i am missing?

  • @parveen545
    @parveen545 Před 4 lety

    one of the wonderful video, thank you very much for this video. many thanks bro :)

  • @DaviSoares401
    @DaviSoares401 Před 4 lety

    Thanks a lot mate, its working prety good, it's awesome.

  • @sashatv138
    @sashatv138 Před 4 lety

    Thank you, Kevin for this video!

  • @violet-trash
    @violet-trash Před 4 lety

    Thanks, I was following a react tutorial and was completely lost until I found out that they were working with an older version of gulp. 😅

  • @nigarkazim8526
    @nigarkazim8526 Před 5 lety

    Thank you Kevin! You saved my day

  • @CodingAfterThirty
    @CodingAfterThirty Před 4 lety

    Exactly the video I needed to see. Thank you. 🙏

  • @wandavazquez3201
    @wandavazquez3201 Před 5 lety

    Excellent video. Extremely helpful.

  • @maluco456
    @maluco456 Před 4 lety

    Thanks, man this tutorial helped me a lot

  • @qdrawli
    @qdrawli Před 4 lety

    I have trawled the web for some decent gulp tutorials.
    Some have been over complicated and some seem to have a bizarre mix of the old and new(v4). I also have some subscripotions to paid services and even on there they were way to complicated. In every case not many of them worked for my basic level of understanding.
    This one however was perfect. Followed your instructions and it has worked perfectly. Well Done!.
    Now I will try and hopefully build on this with things like sourcemaps, auto prefix, rename etc.

    • @KevinPowell
      @KevinPowell  Před 4 lety +1

      Glad I could help!

    • @qdrawli
      @qdrawli Před 4 lety

      Kevin Powell do you think think you will do a part 2 to this where you add additional functionality. Mijification. Rename. Autoprefixer. Source maps.
      Hint hint.

    • @doriansabo7123
      @doriansabo7123 Před 4 lety

      Did you use 4.0.2 version with the code form the video, does it work?

    • @qdrawli
      @qdrawli Před 4 lety

      Dorian Sabo it worked yes

  • @lanreadedeji2426
    @lanreadedeji2426 Před 5 lety

    Thank you for the tutorial on Gulp 4 much Appreciated

  • @Jay-eg7yt
    @Jay-eg7yt Před 4 lety

    Great Gulp4 tutorial. Thanks! They are hard to come by. I appreciate this. Are planning on taking this series to the next level with advance features such as build, series, parallel etc. I tried reading the documentation, but it's taking me forever to understand. If you sell courses on line I'd be happy to join. Cheers!

    • @Jay-eg7yt
      @Jay-eg7yt Před 4 lety

      It as also be great to learn how to view your project local host from an external smart phone. You mentioned @22:02 that browser-sync assigns an external address for devices on the same network to view . How can we access this?

  • @anhquannguyen5111
    @anhquannguyen5111 Před 4 lety

    Thank you so much. What a great tutorial!

  • @ceytrade
    @ceytrade Před 4 lety

    Thanks, Kevin. Really helpful.

  • @mehmoodshaida4580
    @mehmoodshaida4580 Před 5 lety

    thanks a lot it has solved my problem very very helping material i search it and finally i found it here

  • @taniamonalisa2856
    @taniamonalisa2856 Před 4 lety

    Hey I m ur new subscriber This video really so much helpfull...
    Thank you so much....................
    sir you are a great teacher...

  • @sonnigro2490
    @sonnigro2490 Před 4 lety

    Great tutorial, this help me a lot!, all clear thanks you.

  • @engineer_on_weekends
    @engineer_on_weekends Před 4 lety

    Hey I m ur new subscriber This video really helpfull...
    Thank you
    sir you are a great teacher...keep it up 👌

  • @brian554xx
    @brian554xx Před 3 lety

    17:03 c'est tout! (made me happy enough to back up and find the timestamp and write a comment.)

  • @Atindraghosh
    @Atindraghosh Před 3 lety

    thank you, sir. It was very helpful.

  • @davidgrig4608
    @davidgrig4608 Před 4 lety

    Kevin you are AWESOMEEE ty very very much

  • @KolawoleAyedoun
    @KolawoleAyedoun Před 3 lety

    That was so much helpful. Thanks a lot.

  • @socketam4524
    @socketam4524 Před 4 lety +1

    Same vscode color theme =)
    Really good tutorial.

  • @cagrkart580
    @cagrkart580 Před 3 lety

    You saved my day! thank you . you are amazing

  • @TazExprez
    @TazExprez Před 3 lety

    Thanks a lot! Great Gulp 4 tutorial!

  • @user-ym6wu9tl7b
    @user-ym6wu9tl7b Před rokem

    You saved my life ❤️💕💕 thank you

  • @carllarobis6291
    @carllarobis6291 Před 4 lety

    My God thank you, it took me awhile because there is and error in my side but I did it, Awesome!

  • @vladaliman97
    @vladaliman97 Před 3 lety

    Exactly what i was looking for!

  • @trigovai6258
    @trigovai6258 Před 5 lety

    Very helpful! Thank you so much!

  • @nenino265
    @nenino265 Před 5 lety

    Thank you! This video really helped me!!!!!

  • @larissamendes8892
    @larissamendes8892 Před 2 lety

    Thanks for this video,
    i finally learned

  • @karansinghsingare7366
    @karansinghsingare7366 Před 3 lety

    Thank you very much for the great tutorial.

  • @Samuels691
    @Samuels691 Před 4 lety

    This is real quality! Subscribed