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

Option to remove imported files #536

Closed
mikkotikkanen opened this issue Apr 20, 2015 · 6 comments
Closed

Option to remove imported files #536

mikkotikkanen opened this issue Apr 20, 2015 · 6 comments

Comments

@mikkotikkanen
Copy link

If you are running master css file which is just split with imports, it would be nice to have r.js styled removing of the imported files

Ie. if

master.css

@import('buttons.css')
body { background: #fff; }

buttons.css

.btn { background: #bada55; }

Would then become...

master.css

.btn { background: #bada55; }
body { background: #fff; }

...with buttons.css removed.

If file is not imported anywhere, it would be just minified as usual.

@jakubpawlowicz
Copy link
Collaborator

@mikkotikkanen can you point me to relevant r.js functionality? I'd say it's rather a build system functionality rather than a minifier role to remove files.

@mikkotikkanen
Copy link
Author

https://github.com/jrburke/r.js/blob/870ef5140c2fc89867db3f47541bbcf61f4cd38d/build/example.build.js#L349

Yeah, not really sure who's responsibility it is. I guess when running directly from the CLI, it should be the clean-css, but when using as part of the build I guess it should be fe. gulp, though it would be only clean-css which would know which files actually have been combined, not the next step in the build system. Just removing others than the master.css is not really an option neither since some files are included conditionally (like ie fixes etc).

@jakubpawlowicz
Copy link
Collaborator

I'm uneasy about this option at this point so let me think about it first.

Re gulp it's not a problem as clean-css can (and maybe should?) expose a list of inlined files via API.

@mikkotikkanen
Copy link
Author

Yeah, at least the gulp option should be there. :)

And regardless, it should be bind separate options trigger (removeCombined or whatnot) anyhow.

@jakubpawlowicz
Copy link
Collaborator

Moved to clean-css/clean-css-cli#1

@jakubpawlowicz jakubpawlowicz modified the milestone: ~future~ Jan 23, 2017
@jakubpawlowicz
Copy link
Collaborator

@mikkotikkanen it's been released as a part of clean-css-cli 4.1

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

No branches or pull requests

2 participants