Comments (8)
Thanks for the bug report, and sorry for the slow response. I will look into this as soon I get the chance, but I can not make any promises about when.
from ucss.
I've finally been able to have a look at this; sorry that it took so long!
From what I understand, you expect the crawler to go beyond the domain to crawl. But it should never do this: Links to e.g. YouTube will never be followed. This is because your CSS is not relevant for YouTube.
Thus, the links you have in pages.exclude are not needed: pages.exclude is only for pages on your crawled domain that is to be skipped by the crawler.
Let me know if I've misunderstood. Also, if you have suggestions for how to make the documentation/example clearer, please let me know.
from ucss.
Here's some sample output from using this command ucss -h http://www.shaw.ca -c http://www.shaw.ca/uploadedfiles/ecomm/css/shaw-min.css
As you can see it's crawling subdomains (would like to disable that as they are entirely separate sites) as well as Facebook, YouTube and iTunes.
Using just ucss
with essentially the same config as above does produce output although it doesn't appear to crawl beyond the specified page. It's flagging styles that I know for sure are used on other pages (315 used, 3352 unused?... nope!)
from ucss.
Thanks, I can reproduce this. I will try to look into it when I'm back from vacation next week.
from ucss.
Seems like there may be two separate issues:
- Sometimes, pages outside of given domain is visited by crawler.
- The used selectors count seems too low for the specified page. This may indicate that not all pages are visited.
I think I've fixed the first issue (in a separate branch, 82b6678). It was caused by protocol relative URIs (e.g. "//newsroom.shaw.ca/") being handled as domain relative URLs, which is clearly wrong.
As for the second issue: I ran ucss towards your site and got the following (both with config and from command line):
3674 (1303 used, 2364 unused, 304 duplicates, 2 ignored)
This is a higher number of used selectors than you got. Does it seem correct?
(Btw, it seems like you have a broken link somewhere, pointing to hhttps://www.shaw.ca/store/cart/orderLeadForm2.jsp)
from ucss.
There's a good possibility that those results are more accurate. We still have a legacy stylesheet that's still in use (which is the root of this ol' project of mine). I'll take a closer look when I have some time (hopefully next week).
Thanks for pointing out the broken link. I'm surprised our marketing dept. hasn't pointed that out yet... lol
from ucss.
Great! I will try to integrate and launch the changes mid next week, when I am back from travel. Until then, please use the branch mentioned above.
from ucss.
I've integrated and released this now. Very sorry that it took longer than expected.
from ucss.
Related Issues (20)
- More detailed output for unused rules
- Couldn't read dependencies HOT 2
- Follows links to binaries HOT 1
- Option for setting User agent header HOT 1
- Can’t run without config file HOT 3
- Stops unexpectedly without any error message
- Analyse CSS without any HTML page HOT 9
- HTML inside <script> HOT 1
- Needs an option to crawl before and after login HOT 3
- Whether an array is empty or not should be judged by its length, not its self.
- Release v0.4.7 with the latest changes HOT 2
- npm install -g ucss installs a wrong version HOT 2
- possible EventEmitter memory leak HOT 5
- Wildcard in middle of exclude URL doesn't work HOT 2
- UCSS trying to fetch anchor URLs
- offtop: Do you know tool for converting obsolete html attributes to styles? HOT 2
- How does it find all unused css rules? HOT 1
- Dear oyvindeh
- Bug or outdated docs?
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 ucss.