gulp-uncss | Remove unused CSS selectors | Style Language library
kandi X-RAY | gulp-uncss Summary
kandi X-RAY | gulp-uncss Summary
DEPRECATED. Remove unused CSS selectors.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gulp-uncss
gulp-uncss Key Features
gulp-uncss Examples and Code Snippets
Community Discussions
Trending Discussions on gulp-uncss
QUESTION
We have a fairly old Maven web app and I have been tasked with optimizing the front-end. I have found that we have hundreds of unused style rules in our CSS (Which is generated from LESS). We have begun to implement Gulp into our apps build process and I would like to implement a task that removes all unused style rules from our CSS. This should drastically reduce the size of the CSS files we serve up. The problem I have is that this task requires the CSS and HTML files. As this is a JSP app the HTML is generated when a user makes a request for that page, not during the build process. This means I don't have the static HTML files that this task needs.
The plugin I was planning on using is: https://www.npmjs.com/package/gulp-uncss
I was hoping that we could add a build step that generates static HTML files that we could then use in the Gulp task to remove the unused CSS rules, then run another Gulp task that deletes these files.
...ANSWER
Answered 2017-May-22 at 12:00JSP is a dynamic, you never know what is generated from JSP page. It's absolutely dynamic templating engine that compiles to a servlet not html. This servlet writes to the response out a text used by the template.
So, you can't use Gulp on server side using JSP as an endpoint or a servlet retured that JSP.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gulp-uncss
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page