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

Can we clean multiples files using globs ? #19

Closed
francoismassart opened this issue Mar 16, 2018 · 2 comments
Closed

Can we clean multiples files using globs ? #19

francoismassart opened this issue Mar 16, 2018 · 2 comments

Comments

@francoismassart
Copy link

francoismassart commented Mar 16, 2018

If I have css files than I would like to clean like so:

css/
  style.css
  contact/
    contact.css

Can I use clean-css-cli like:

cleancss --level 1 --output css/**/*.min.css css/**/*.css

I do not want to list all my css in the command line or neither to edit the command line every time I add a new css file.

What I am aiming for is this result:

css/
  style.css
  style.min.css
  contact/
    contact.css
    contact.min.css

I could also accept having the source css file overwritten...

Thank you for your help.

@francoismassart
Copy link
Author

I was able to do it thanks to a comment inside the issue #18 :

#18 (comment)

This npm script will replace the files...

"css-minify-all": "foreach -g \"css/**/*.css\" -x \"cleancss --level 1 #{path} -o #{path}\" --no-c"

@jakubpawlowicz
Copy link
Collaborator

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

No branches or pull requests

2 participants