Comments (12)
Same for me.
from grunt-uncss.
I'm running into the same issue, in a CentOS Virtualbox / Vagrant environment if that affects anything. the uncss command line works for me like it does for falzhobel above, establishing among other things that my http://local.mydomain.com host is available within my guest environment (I can also curl it successfully).
This generates an uncss'ed customStep2.css file as expected:
uncss -s vendor_sausage/css/customStep1.css http://local.mydomain.com > vendor_sausage/css/customStep2.css
While the following - which I expect to be functionally equivalent to the above - returns "Fatal error: UnCSS: no stylesheets found":
uncss: {
stylesheets: "vendor_sausage/css/customStep1.css",
files: {
"vendor_sausage/css/customStep2.css": "http://local.mydomain.com"
},
options: {
report: "min"
}
}
Maybe I'm doing it wrong, more detailed examples in the documentation would help understand better how some of the options work.
I really hope this will work so that the whole chain of CSS actions in my Gruntfile can be complete:
- Bootstrap LESS + custom LESS > CSS
- CSS > UNCSS (the step that doesn't work)
- Minify for dist
- check CSS metrics between sources and final product for bragging rights!
from grunt-uncss.
Debugged a little bit and found that urls in the src are removed or something. Searched info in Grunt's documentation, but didn't find.
So made this workaround:
uncss: {
dist: {
files: {
'tiny.css': ['index.html']
},
options: {
urls: ['{someurl}']
}
}
}
Where index.html is just an empty html file. Works as charm. Tried urls ending with .html, .php, .aspx
from grunt-uncss.
Thanks for reporting this issue. For those who ran into it, could you let me know what version of grunt-uncss
you're running into this problem with so I can track it down and fix?
from grunt-uncss.
grunt-uncss 0.2.2 with grunt 0.4.4.
from grunt-uncss.
grunt-uncss 0.2.0 with grunt 0.4.2
from grunt-uncss.
grunt-uncss 0.2.2 with grunt 0.4.4.
from grunt-uncss.
Throwing in for more updated version info (@minmur 's solution worked):
grunt-uncss 0.3.3 with grunt 0.4.2
from grunt-uncss.
I also ran into this issue. Thankfully @minmur's workaround did the trick.
grunt v0.4.2 & grunt-uncss v0.3.5.
from grunt-uncss.
I also ran into the same issue with our Angular app, @minmur solution worked for me as well, but I had to set a timeout option.
from grunt-uncss.
Let's add a solution for this in time for the next release.
from grunt-uncss.
Does this still happen with 0.5.2?
from grunt-uncss.
Related Issues (20)
- Incomplete css HOT 1
- Sync Multiple Vscode?
- Missing dependency of PhantomJS HOT 1
- Regex in src urls HOT 3
- JS errors without inline scripts HOT 1
- Fatal error: Cannot communicate with PhantomJS process: PhantomJS exited unexpectedly: read ECONNRESET HOT 2
- Not taking into account the classes that are added through angular HOT 5
- does it conflict with JQuery HOT 2
- bootstrap alert not processed HOT 1
- Grunt uncss fails silently mac HOT 2
- "ignoreSheets : [/fonts.googleapis/]" isn't ignoring Google fonts HOT 1
- Fatal error: connect ECONNREFUSED 127.0.1.1:80 HOT 2
- Fatal error: uncss/node_modules/css: unable to parse... Excessive slag in URI. HOT 2
- UnhandledPromiseRejectionWarning: Unhandled promise rejection HOT 2
- file.src should be file.orig.src (grunt 1.0.1)
- ignore doesn't work HOT 2
- GitHub Actions CI HOT 3
- Timing Problems with many files HOT 1
- Remove deprecated request package
- Does this work project-wide with SASS files?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-uncss.