katiefenn / parker

Stylesheet analysis tool.
Other
2.47k stars 72 forks source link

Recursively parse folder #41

Closed tzi closed 8 years ago

tzi commented 9 years ago

Hi !

Thanks for sharing & maintaining this tool.

In a project, we have a deep folder architecture. Parker seems to only parse stylesheets that are directly in the CSS root folder.

Cheers, Thomas.

bartveneman commented 9 years ago

Is it actually useful to run Parker on multiple files? I understand that this might be useful for concatenated files or partial files, but I don't think it's a good idea to run Parker on all your source files, because then you'd have to review all of them instead of a couple of bigger files, which is a lot easier and less time consuming.

tzi commented 9 years ago

Hi @bartveneman!

I think it could be interesting to follow some values for the entire code base:

But it also a great feature to be able to parse one file to review it.

Cheers, Thomas.

bartveneman commented 9 years ago

It isn't so hard to setup a build process so all files get merged into one file, right? I don't think scanning directories is a responsibility of Parker but of us developers. Glad to help if you need some :)

tzi commented 9 years ago

My css files are merged into a single file... but only during the deployment process ;) I don't need to merge it on my local computer.

I understand you don't need this features. Perhaps it's not the case for everyone. For example, feature like #3 Sass support will certainly need it.

Cheers, Thomas.

bartveneman commented 9 years ago

Just trying to come up with a possible solution or improvement. Isn't it possible and maybe better to let Parker run in your build step?

danez commented 9 years ago

We had the same problem and made parker glob-aware. The only limitation currently is, that some files might be read multiple times, when mixing glob-paths and non-glob-paths.

https://github.com/researchgate/parker/tree/accept-glob-args

tzi commented 9 years ago

@danez Glob is certainly a nice feature! I made a PR (#42) for recursive folder parsing. Don't hesitate to try it... and upvote it ;)