javascript - Trying to use grunt uncss to remove some css -


i have website inherited couple of gigantic css files analysing dust-me selector in firefox return me 2000 unused styles.

to remove them i'm trying use grunt uncss, problem following error:

grunt uncss running "uncss:dist" (uncss) task fatal error: uncss/node_modules/css: missing '}' near line 2429:5  ->     .mobile-hidden { 

those configuration files

package.json

{   "name": "tappr-registration",   "version": "0.1.0",   "devdependencies": {     "grunt": "~0.4.5",     "grunt-contrib-copy": "^0.7.0",     "grunt-contrib-jshint": "~0.10.0",     "grunt-contrib-nodeunit": "~0.4.1",     "grunt-contrib-uglify": "^0.6.0",     "grunt-processhtml": "^0.3.3",     "grunt-uncss": "^0.3.7"      } } 

gruntfile.js

module.exports = function(grunt) {  // project configuration. grunt.initconfig({     pkg: grunt.file.readjson('package.json'),     uncss: {         dist: {             options: {                 media: ['min-width'],                 timeout: 1000,                 htmlroot: 'public_html',                 report: 'max'             },             files: {                 'dist/clean.css': ['public_html/index.php',     'public_html/page_2.html', 'public_html/page_3.html']             }         }     } });  // load plugin provides "uncss" task. grunt.loadnpmtasks('grunt-uncss'); grunt.loadnpmtasks('grunt-processhtml');  grunt.registertask('default', ['uncss','processhtml']); }; 

now, best guess error because specifying in wrong way media queries include haven't found decent documentation on how uncss wants option.

i tried take off options.

do has suggestion?

believe or not problem caused comments:

<!-- ----- responsive 34.2857142857em ------> 

after remove them worked fine , can needed.

running "uncss:dist" (uncss) task file cleancss/tidy.css created: 229.48 kb → 25.98 kb 

:)


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -