Runtime Lint for Web Applications: SiteGazer find console errors & HTML errors from the generated HTML.
Runtime Lint for Web Applications: SiteGazer find console errors & HTML errors from the generated HTML.
nu
plugin)Note: SiteGazer does not work on Windows Subsystems for Linux due to puppeteer limitation. See also this issue.
$ yarn global add sitegazer
$ npm install -g sitegazer
If you want to install with sudo
on Linux systems, yarn is recommended way to install.
Unfortunately, sudo npm install -g sitegazer
may fail to install due to permission issue.
Here's example of sitegazer.config.js. For full reference, see sitegazer.config.js reference section
"use strict";
module.exports = {
urls: [
"https://phanective.org",
"https://google.com",
],
sitemap: true,
plugins: [ "nu", "chrome-console" ],
};
$ cd /path/to/directory # Move to the directory which sitegazer.config.js exists
$ sitegazer
"use strict";
module.exports = {
urls: [
"https://phanective.org",
"https://phanective.org/cv/",
"https://google.com",
],
sitemap: true,
plugins: [ "nu", "chrome-console" ],
userAgents: {
desktop: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36",
mobile: "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Mobile Safari/537.36"
},
};
urls
Type: string[]
Default: []
URLs to lint.
sitemap
Type: boolean
Default: false
If true, SiteGazer lint the URLs listed in sitemap.xml, in addition to URLs listed in urls
.
plugins
Type: string[]
Default: []
Linter plugins. Currently SiteGazer Supports following plugins:
nu
(Nu HTML Checker)chrome-console
(List errors detected on Console of Chrome Developer Tools)Type: object
Default:
{
desktop: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36",
mobile: "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Mobile Safari/537.36",
}
Object of user agent strings. If two or more user agent strings are given, SiteGazer lint with each user agent strings.
Apache 2.0
© 2019 Jumpei Ogawa