Travis CI: "UnCSS: Configuration missed" in Travis CI


I'm trying uncss-brunch with Travis in a test project . brunch build works locally, but when I do git push the build in Travis fails:

18 Apr 22:38:59 - error: UnCSS: Configuration missed. 

Any ideas of what may be wrongly configured or how can I get more information to find the bug?

asked by ArthurChamz 19.04.2016 в 00:54

1 answer


What happens is that you have not configured the UnCSS options in your brunch-config.js file.

The reason why it works with brunch build is that UnCSS is not really running, it only runs when you do an optimized build . The script used by Travis is, as I see in the log , "dist" and that has been defined as : "dist": "del public && npm test && brunch build -p" . Note that in that script you are passing the flag -p at the end, which indicates that you must run the build production or optimized.

To solve the problem, add the UnCSS section within plugins to your brunch settings, for example:

// Estos son valores de ejemplo, tienes que configurarlo según la estructura de tu proyecto
plugins: {
    // ...
    uncss: {
        options: {
            csspath: '../styles',
            htmlroot: 'build'
        files: ['index.html', 'about.html']
answered by 19.04.2016 / 05:28