Skip to content
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

Add multiple source/output files and watchRelatedFolders feature #125

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Alex-hv
Copy link

@Alex-hv Alex-hv commented Apr 8, 2021

In this PR I propose to add 2 features:

  1. Multiple source/output files: The first one is about multiple source/output files. It may be useful when you need to have several output files based on different source files with different (or same) configs. For instance: for the first environment, you may need to use only base tailwind generated file, with one config. For the second environment, you want to use another tailwind file with other sourceCSS and other config
  2. watchRelatedFolders: you may want to include the whole folder to watch, so it allows you to do that

Oleksandr Honcharov added 2 commits April 8, 2021 14:24
1) config can be either object or array.
2) you can watch not just related files, but folders too.
@tehpsalmist
Copy link
Owner

tehpsalmist commented Apr 12, 2021

Hey, thanks for submitting the PR! Can you actually remove the version bump (and any other incidental changes npm made during npm version), and also lint out any of the semicolons that got inserted? I should have set up a check using standardjs or something, sorry about that. I'll try to give it a good review/test after that. Thanks!

@Alex-hv
Copy link
Author

Alex-hv commented Apr 12, 2021

Hey @tehpsalmist, done!

@tehpsalmist
Copy link
Owner

I am so sorry it took me this long to get to this. I hope you won't mind answering another question or two.

Is there something missing in the angular build system that led you to reach for this package and tweak these features? I'm just curious because this package really should be deprecated now that angular allows you to adjust the build settings liberally. But if even that is not cutting it, then of course I'd love to see this package still fill that gap. I'm also interested in hearing a detailed use case for this multi-config thing. It sounds...interesting.

I've tried to make sure that the configure command works to update the config in place, but this will of course break that. Do you have any thoughts on that and whether it might be possible to salvage that functionality?

What do you think about the watchRelatedFolders being able to create an infinite loop, where a folder containing an output file is also being watched (like the root dir, for example). I messed around with this and found that when errant re-processing is caused, it sometimes causes the sass temp files to be missing, which throws an error. We could shore things up a bit by always returning the promises and making this run sequentially a little tighter, but I'm also thinking that maybe some kind of protection could be introduced to avoid this altogether. I'm interested in your thoughts.

I can see how it's nice to see all the files being watched, but if you're watching a large directory, that list is unwieldy. What options do you think there are to truncate that list or display it in a way that doesn't overwhelm the terminal output?

Again, sorry this took me so long. I don't use this package any more, but I do want to be helpful to the community that might be leaning on it. Thanks for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants