cssstats / get-css Goto Github PK
View Code? Open in Web Editor NEWMoved to monorepo
Home Page: https://github.com/cssstats/cssstats/tree/master/packages/get-css
License: MIT License
Moved to monorepo
Home Page: https://github.com/cssstats/cssstats/tree/master/packages/get-css
License: MIT License
Result of the discussion from #6
I suspect it's a result of not following redirects.
Shouldn't this module also handle URLs that point directly to css files?
Actually this is handled in cssstats: resource.js
IMHO this should use the same request
command like in get-css
I think a CLI would be pretty useful. I've got a few different use cases where I'd like to do something like:
getcss http://foo.bar > foobar.css
Do you think this would be worthwhile to incorporate into this project? I'd be happy to submit a PR with the functionality above if you think it's worth it.
TypeError: Cannot read property 'match' of undefined
at resolveUrl (/var/www/cssstats/node_modules/get-css/utils/resolve-url.js:4:10)
at createLink (/var/www/cssstats/node_modules/get-css/utils/create-link.js:6:10)
at Object.<anonymous> (/var/www/cssstats/node_modules/get-css/index.js:53:25)
at exports.each (/var/www/cssstats/node_modules/cheerio/lib/api/traversing.js:294:24)
at parseHtml (/var/www/cssstats/node_modules/get-css/index.js:51:27)
at Request._callback (/var/www/cssstats/node_modules/get-css/index.js:133:7)
at Request.self.callback (/var/www/cssstats/node_modules/request/request.js:198:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (/var/www/cssstats/node_modules/request/request.js:1063:14)
Trying to use get-css on my own app, Noodles. The login page (http://www.getnoodl.es/login) has the whole application's CSS, but get-css returns Error: getaddrinfo ENOTFOUND getnoodl.es
on it.
Currently, get-css
doesn't have support for CSS @import
s, so no CSS shows up in a base file consisting of:
@import url(foo.css);
@import url(bar.css);
Additionally, CSS files with content and @import
s are not receiving all the CSS the document contains.
If you'd like, @jxnblk, I can start tackling this in the next day or so. I suspect it will require some rejiggering of the index.js
because one has to assume that any @import
ed CSS file could also contain another @import
.
Thanks for the awesome work, by the way. This is an awesome module.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.