Comments (3)
Glad you like it!
To your first point, check-pages
is a library, so logging and error handling are generally up to whatever code is using it. The API allows you to pass console
as the Host
parameter for easy logging (https://github.com/DavidAnson/check-pages/blob/master/README.md#host), but you can pass something else that customizes the output if you'd like (such as by coloring it or adding pretty icons). Regarding the exception you are getting, I think that check pages handles it's own errors properly, but if you have a simple demonstration of the problem, I'd like to understand if this is actually a bug in my code.
Regarding your second point, colorization and summarization of output is something that the check-pages-cli package (https://github.com/DavidAnson/check-pages-cli) already supports. If that's relevant to your scenario, please try it out because you may find it's easier to use and maybe more friendly. :)
from check-pages.
Assuming the above reply was helpful, I'm closing this issue to clean up. Thanks!
from check-pages.
Hey @DavidAnson, thank you for your answer. The cli
is a little inconvenient as I am using it in gulp, however, I just use the logging function from there and it is perfect. For anybody who needs it:
let host = {
"log": function log (msg) {
console.log(chalk.green('✔ ' +msg));
},
"error": function error (msg) {
console.error(chalk.red('× ' +msg));
}
};
checkPages(host, options, callback)
I believe the issues arise from redirects on my side, the page errors did not show up before I used your function. So I will investigate this further.
from check-pages.
Related Issues (9)
- Problem with using generic page urls HOT 12
- feature_request(checkLinks): check if fragment identifier exists HOT 2
- Feature request: Support attribute srcset HOT 1
- Plugin does't report absense of href attribute and empty href attributes HOT 3
- Consider a rule to check that expected attributes are present for HTML elements HOT 1
- Node-Errors. HOT 2
- Page error (connect ECONNREFUSED HOT 14
- dead link not picked up running checkDev task with gulp HOT 3
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 check-pages.