ahmadawais / WPGulp

An advanced Gulp workflow for WordPress development with extensive documentation. Used by 40,000+ themes and plugins.
https://twitter.com/MrAhmadAwais/
MIT License
1.76k stars 303 forks source link

how to configure project variables to compile from multiple SASS directories #162

Closed arnoldbird closed 4 years ago

arnoldbird commented 4 years ago

I'm having trouble getting started with WPGulp. Have installed it successfully, but it's not clear how to do step 2 in the README, "Editing the Project Variables."

I can get my main style.scss file to compile to style.css, but this is not very useful. I need gulp to compile multiple SCSS files into my style.css.

My directory structure is like...

my_theme/style.css my_theme/sass/style.scss my_theme/sass/subdirectory/_example.scss my_theme/sass/subdirectory2/_example2.scss etcetera

How do I get all the SCSS files to compile to my_theme/style.css?

This doesn't seem to work: styleSRC: './sass/style.scss', styleDestination: './', watchStyles: './sass/**/*.scss',

Thanks.

robmim commented 4 years ago

You need to import thoses subdirectory files inside your style.scss and then set your style.scss as primary source for your css ?

https://www.dropbox.com/s/oyc5g1ewh82valg/Capture%20d%27%C3%A9cran%202019-10-08%2011.19.22.png?dl=0

ahmadawais commented 4 years ago

Import all these files in one single styles.scss file. That should do it.

arnoldbird commented 4 years ago

Thanks! That's it exactly.