-
-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile multiple CSS files into different directories #103
Comments
Apologies, I've been away due to a family emergency. Will respond soon. Nice ideas. |
No worries @ahmadawais |
@cdils now that v2 has been released how do you propose we can handle this? |
I also want this feature. |
I see an approved PR for this in #125 - how can we get it merged? |
Pinging this! I just duplicated style-RTL to generate basically the same files as @cdils although not very elegantly. Are there any roadblocks on this merge, I'd love to try it out! |
None beyond time. If you can test this and review the PR it will help. |
I've tested this PR and for me is it working like a charm! Thanks @mintbird for your work! |
I'm in the process of adding editor-specific and gutenberg-specific styles to a project. While this is possible with the existing WPGulp
styles
task, I'd like to suggest a more elegant implementation.Current output
In my project
config.js
file under Style Options, I have:styleSRC
points to three Sass files I have created:editor-styles.scss
// editor stylesgutenberg.scss
Gutenberg-specific stylesstyles.scss
// main style sheetRunning these through the
styles
task produces these files in my project root:Proposed output
That's a lot of clutter. I'd prefer to see something like this:
It's debatable whether or not a CSS map for editor and Gutenberg styles is that useful, since those are presumably quite small files and easy to troubleshoot. It's also debatable whether you'd want to keep the three main style sheet variations in the root or move everything off to a
css
folder, save forstyles.min.css
.Possible solution
There are multiple approaches to this. One is to add a couple of variables to
config.js
such asstyleSRCHelpers
andstyleDestinationHelpers
and use that as the basis for a new gulp task that mimics the currentstyles
task, but skips sourcemap creation and routes "helper" css files (for editor and gutenberg) to a different location (i.e.css/
folder).Forgive me, my brain isn't creative enough for better thoughts on names at the moment!
Feedback wanted
Ultimately, I'd like feedback on:
Whether there's a use-case to even justify adding something like this to WPGulp versus me just implementing a one-off solution in my project. My gut is that with Gutenberg coming, there's a good use-case for generating Gutenberg-specific stylesheets and wanting to store those somewhere other than the project root. Gutenberg aside, I think there's also a use-case for needing to compile specific Sass files to specific folders. For example, if I needed to create custom styles to extend Easy Digital Downloads, I'd need to compile those Sass files into an EDD-specific folder. For reference, here's how compiling multiple CSS files was done in wp-gulp-toolkit.
Thoughts on implementation. The solution I mentioned above is just one idea. Whatever solution is involved would need to also consider how/if generating corresponding
rtl
files is necessary.If this is something that would be worthwhile for WP Gulp, I'm happy to investigate further, but would appreciate some input.
The text was updated successfully, but these errors were encountered: