Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Path to folder #16

Closed
kopipejst opened this issue Apr 10, 2013 · 7 comments
Closed

Path to folder #16

kopipejst opened this issue Apr 10, 2013 · 7 comments

Comments

@kopipejst
Copy link

Usually CSS is separated in multiple files for development and than merged for production. It will be great if we could run csscss to compare all files from one folder by giving path to folder.

@zmoazeni
Copy link
Owner

@kopipejst Thanks for the suggestion. Do you mean something more than what you get from find ... | xargs csscss ...?

I'd like to keep cssscss part of a normal posix toolchain. Some questions come up with file selection from a directory that may make the command line interface more complex.

@kopipejst
Copy link
Author

I'm not sure if and how that can be achieved with find ... | xargs csscss ... but I was thinking that something like:

csscss path/to/folder -v

give output similar to:

{.class1} from file1.css AND {.class2} from file2.css share 4 rules

  • border-style: solid
  • border-width: 1px
  • padding-bottom: 15px
  • padding-top: 15px

that will help to find duplicates in development phase, before merging.

@zmoazeni
Copy link
Owner

@kopipejst so right now csscss -v file1.css file2.css some/dir/file3.css will work. I think what you're suggesting is a way for csscss to find all css files within a directory. For example find . -iname "*.css" | xargs csscss -v would work. And I'd rather lean on that for now.

However. I think I found a bug in csscss -v file1.css file2.css some/dir/file3.css finding duplications. So I'll investigate.

@kopipejst
Copy link
Author

@zmoazeni thanks for quick reply. find ... | xargs csscss ... works just fine, but it seems that csscss -v for multiple files still compare css within each file separately. Also, it will be great if we could see file name in output, something like this:

{.class1} from file1.css AND {.class2} from file2.css share 4 rules

@zmoazeni
Copy link
Owner

Also, it will be great if we could see file name in output, something like this:

{.class1} from file1.css AND {.class2} from file2.css share 4 rules

Ah great suggestion. I think that does make sense. There's some talk about including line numbers too #9

@zmoazeni
Copy link
Owner

@kopipejst I just opened #39 which is all about line numbers

zmoazeni added a commit that referenced this issue Apr 12, 2013
Previously some comparisons were dropped due to minimums within a file

refs: #16
@zmoazeni
Copy link
Owner

Ok, I just pushed a fix to the consolidation issue. WIth that along with the new issue with line numbers, I'm going to close this one. That will get released in the next version (the one after v1.0.0).

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

No branches or pull requests

2 participants