davidanson / grunt-check-pages Goto Github PK
View Code? Open in Web Editor NEWGrunt task that checks various aspects of a web page for correctness.
License: MIT License
Grunt task that checks various aspects of a web page for correctness.
License: MIT License
When running jscs the output I get looks like this:
Running "jscs:src" (jscs) task
>> 3 files without code style errors.
Is there a way to get a similar summary output without actually displaying each of the links that is checked?
URLs with a hash character will always be valid and can safely be ignored, at least as an option. Someone might want to check if these occur, and if so they would be an error.
I modified checkPages like so:
function addLinks($, element, attribute, page, index) {
var pageHostname = url.parse(page).hostname;
$(element).each(function() {
var link = $(this).attr(attribute);
if (link && link !== '#') {
var resolvedLink = url.resolve(page, link);
var parsedLink = url.parse(resolvedLink);
if (((parsedLink.protocol === 'http:') || (parsedLink.protocol === 'https:')) &&
(!options.onlySameDomain || (parsedLink.hostname === pageHostname)) &&
!isLinkIgnored(resolvedLink)) {
// Add to beginning of queue (in order) so links gets processed before the next page
pendingCallbacks.splice(index, 0, testLink(page, resolvedLink));
index++;
}
}
});
return index;
}
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.