Тёмный

Learn how to supercharge WordPress with @wordpress/scripts 

Marcelo Vieira
Подписаться 677
Просмотров 1,8 тыс.
50% 1

Get ready for an incredible journey of enhancement for your WordPress theme! In this video, I'll guide you through the powerful @wordpress/scripts package, unveiling its secrets and demonstrating, in practice, how to completely integrate it with an existing theme.
I'll also be sharing practical examples involving the integration of two essential tools: BrowserSync and Tailwind CSS.
In this tutorial, we demystify the process for aspiring designers who want to build a classic theme from scratch.
Feeling overwhelmed by pre-made themes? Fear not! We guide you through the essential files and step-by-step process. Let's turn your theme creation dreams into reality!
************************************
SUPER DISCOUNT in all my courses at Udemy!
Get them NOW: www.codigowp.n...
************************************
My new book, "The Web Developer's Guide to WordPress," is now available.
GET IT NOW, Kindle or Paperback format: www.amazon.com...
************************************
🚀 Some pieces of code used in this video:
1) package.json
"scripts": {
"start": "npm-run-all --parallel sync wpstart tailwindwatch",
"wpstart": "wp-scripts start",
"build": "npm-run-all --parallel wpbuild tailwindbuild",
"wpbuild": "wp-scripts build",
"sync": "browser-sync start -p 'test-site.local' --files '**/*.php' 'build/*.js' 'build/*.css'",
"tailwindwatch": "tailwindcss -i ./src/index.css -o ./build/index.css --watch --minify",
"tailwindbuild": "tailwindcss -i ./src/index.css -o ./build/index.css --minify"
}
2) tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./**/*.php", "./src/**/*.js"],
plugins: []
}
Don't forget to like, share with other WordPress enthusiasts, and subscribe for more tips, tricks, and tutorials!
#wordpress #wordpresstutorial #themedesign #wordpresstheme #webdevelopment

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

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 20   
@beardedbacon4142
@beardedbacon4142 2 месяца назад
Thanks for the tutorial. I was trying to figure out how to get tailwind and @wordpress/scripts working together and was missing that I needed to import index.css into the index.js for it to actually create the index.css file in the build folder
@jameshofton
@jameshofton 4 месяца назад
Thanks so much, this is exactly what i was looking for, i want to use tailwind with blocks.
@marceloxv
@marceloxv 3 месяца назад
Glad it was helpful, dear James!
@frontenddeveloper9173
@frontenddeveloper9173 9 месяцев назад
Hi marcelo you doing a great Job keep it up I learn alot from your lessons.
@marceloxv
@marceloxv 8 месяцев назад
Glad to hear that! Thank you very much for your comments, my dear! :-)
@calippo13
@calippo13 5 месяцев назад
Hi Marcelo! I already knew and used @wordpress/scripts but I tried in vain to activate browser-sync at the same time and in 2 minutes you solved the problem! Eternally grateful! I have a second problem and maybe you would know how to solve it. When I create a wordpress project I first create the project in HTML-CSS-JS using PostCSS to organize my CSS. Unfortunately @wordpress/scripts uses SCSS. Could PostCSS be integrated into the scripts so I don't have to translate all my mixins from PostCSS to SCSS? I hope I have explained myself. In any case this is a wonderful day thanks to you!!!
@marceloxv
@marceloxv 5 месяцев назад
Oh my God! I really don't know what to say! I'm so happy when I see my content is meaningful to other people! Thanks for sharing your opinion and valuable experience :-) Well, do you believe if I say I've never used PostCSS before? Can you share your project with me somehow? Maybe I can find a way to test it and help you... My email is marceloquinze@gmail.com I can't guarantee I'll be able to help you, but I can try.
@WesleyCardoso-f3g
@WesleyCardoso-f3g 6 месяцев назад
I learn a lot from your work
@marceloxv
@marceloxv 5 месяцев назад
Thank you for your comment, dear friend! Very glad to know you like the content :-)
@MegaOnerb
@MegaOnerb 8 месяцев назад
Amazing tutorial ❤
@marceloxv
@marceloxv 8 месяцев назад
Thank you! 😊
@thebilalafsar
@thebilalafsar 7 месяцев назад
Hey Marcelo! Could you create a detailed tutorial on WordPress speed optimization and Core Web Vitals? I'm eager to learn how to achieve a 90%+ Google PageSpeed score and pass the Core Web Vitals for a WordPress site without solely relying on plugins. I'm not interested in the typical speed optimization methods, such as installing caching or image optimizer plugins. Instead, I'm looking for a manual and comprehensive guide that really helps. Thanks!🙏
@marceloxv
@marceloxv 7 месяцев назад
Thanks for the suggestion :-) On my list.
@thebilalafsar
@thebilalafsar 7 месяцев назад
@@marceloxv
@thebilalafsar
@thebilalafsar 6 месяцев назад
@@marceloxv Hello Marcelo! Is there any update?🥲
@RosanaFreedman
@RosanaFreedman 9 месяцев назад
Hi Marcelo! Thank you! 🙏🏻🌷🙏🏿
@marceloxv
@marceloxv 9 месяцев назад
Thank you for your comment, dear friend :-)
@ravimakwana1641
@ravimakwana1641 4 месяца назад
Great, how can I purge the unnecessary css?
@marceloxv
@marceloxv 4 месяца назад
Sorry, I didn't quite get your question. What exactly you want to do with your CSS?
@ravimakwana1641
@ravimakwana1641 4 месяца назад
@@marceloxv I mean to remove unncessary CSS like I use bootstrap so all CSS classes I don't use for each page, you can search more about puregCSS module.
Далее
ВЫЖИЛ В ДРЕВНЕМ ЕГИПТЕ!
13:09
Просмотров 264 тыс.
Bricks vs Block Themes: My Followup to Bridge Builders
24:21
Full Snack Sunday 15th Sep 2024 Session
1:18:58
Getting started with React inside WordPress
24:36
Просмотров 6 тыс.
WordPress Full Site Editing But For Developers
19:22
Просмотров 25 тыс.
10 Tailwind Tricks You NEED To Know!
10:45
Просмотров 296 тыс.
ВЫЖИЛ В ДРЕВНЕМ ЕГИПТЕ!
13:09
Просмотров 264 тыс.