zalando / gulp-check-unused-css Goto Github PK
View Code? Open in Web Editor NEWA build tool for checking your HTML templates for unused CSS classes
License: Other
A build tool for checking your HTML templates for unused CSS classes
License: Other
ng-class="{ 'whatever': condition }"
E.g. the col-offset
classes of Bootstrap.
This module should also be made available to projects who use Grunt as their build tool.
Most likely a new module should be created for this in order to keep the grunt and gulp config separate (possibly have a standalone module for the core functionality and then modules for different build tools).
Hey, very nice gulp package.
I have a small problem: I have files in public/*.html
and in public/portfolio/*.html
. I don't seem to find a way to add both, can you please help me with this? Thanks.
Hello there
Great idea, this module comes in very handy!
But all my templates are written AND served in Jade templates. So would be great if your module can interpret Jade templates besides HTML files as well.
Thanks!
Because you may use a fork of Bootstrap.
Like {{ className }}
Functionality should be added to support LESS code.
Hi,
First of all thank you for the plugin, it looks very good! So I wanted to try it on my project and nothing got printed on my terminal
I followed the different steps to install gulp-check-unused-css
and here is my gulp file
var gulp = require('gulp');
var checkCSS = require('gulp-check-unused-css');
gulp.task('css', function() {
gulp.src(['/**/*.css', '/**/*.{jsp,tpl}'])
.pipe(checkCSS());
});
And here is what I get back in my terminal
$> gulp css
[11:42:40] Using gulpfile ~/dev/project/gulpfile.js
[11:42:40] Starting 'css'...
[11:42:40] Finished 'css' after 13 ms
I first assumed that my glob
was wrong and used gulp-print to check that I was matching files and everything seems good!
I load the following version:
Am I doing something wrong here? I couldn't find relevant information in the read me to help me debug that.
Thanks
Wiki pages should be added to augment the existing README
Add code coverage using coveralls
Check if all classes in the HTML have a corresponding selector in order to not pollute the templates. This might yield even bigger problems with CSS frameworks (esp. Bootstrap) than it does now though; my ignore list is quite long already.
Maybe also introduce predefined sets of "global classes", much like JSHint environments?
When I run this on an old code base I get the following:
[14:18:03] Error in plugin 'gulp-check-unused-css'
Message:
Unused CSS classes
Details:
As you can see when you open details
, it is just a huge list of classes. However, I think it would be much more useful to get a list with maybe even the line number in the css file.
Hey -- had my JF with E Bowman today and we talked about what we ought to do with deprecated projects. We agreed we should try to find new owners for them. Let's find a new owner for this one--I will reach out to various front-end communities. Just wanted to run it by you first.
We should add zappr configuration in order to keep our pull request process correctly managed
Extracting util (./util/extract.js) does not parse selectors in the media-queries.
E.g. -sm, -lg, etc. classes from the Bootstrap framework would never be added to a new .ignore file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.