Code Monkey home page Code Monkey logo

Comments (4)

chriswrightdesign avatar chriswrightdesign commented on July 20, 2024

It looks like in the try catch block the done(); has been moved.
The new one

uncss(src, options, function (output) {
                    grunt.file.write(f.dest, output);
                    done();
                });

the previous (one that works with no error for me)

uncss(src, options, function (output) {
                    grunt.file.write(f.dest, output);
                });
                done();

Moving it fixed the error.

from grunt-uncss.

addyosmani avatar addyosmani commented on July 20, 2024

Weird. So, the old one was occasionally being called too early, even if the uncss process hadn't completely finished processing. I'll look into this again.

from grunt-uncss.

pawelmhm avatar pawelmhm commented on July 20, 2024

I get this error when I add "stylesheets" options, uncss.js (version 0.1.6). Runs fine if I remove stylsheet array.

This configuration returns error mentioned above:

uncss: {
        dist: {
            files: {
                'build/css/style.css':['src/search_box.html', 'src/results.html']
            }
        },
         options: {
            ignore:["#linkToTaburl",".searchResultsTemplate",".page-header",".results",".result-item"],
            stylesheets: ["src/lib/css/bootstrap.min.css","src/lib/css/customize_bootstrap.css"]
        } 
    },

But this with commented stylesheets works ok:

 uncss: {
        dist: {
            files: {
                'build/css/style.css':['src/search_box.html', 'src/results.html']
            }
        },
         options: {
            ignore:["#linkToTaburl",".searchResultsTemplate",".page-header",".results",".result-item"] 
           /* stylesheets: ["src/lib/css/bootstrap.min.css","src/lib/css/customize_bootstrap.css"] */
        } 
    },

UPDATE:

after some bug hunting I've found that exception is generated by css.parse, line 215, in my setup this has the following path:
/home/pawel/js/searcher/node_modules/grunt-uncss/node_modules/uncss/node_modules/css/node_modules/css-parse

from grunt-uncss.

addyosmani avatar addyosmani commented on July 20, 2024

Closing as we landed #42

from grunt-uncss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.