@a11ywatch/website-source-builder 中文文档教程
@a11ywatch/website-source-builder
从 url
Installation
npm install @a11ywatch/website-source-builder
获取数据片段
const { sourceBuild } = require("@a11ywatch/website-source-builder");
const data = sourceBuild("http://www.a11ywatch.com");
// output {
// cdnJsPath: `a11ywatch.com/www-a11ywatch-com-ada-fix.js`,
// cdnMinJsPath: `a11ywatch.com/www-a11ywatch-com-ada-fix.min.js`,
// cdnSourceStripped: "www-a11ywatch-com-ada-fix",
// domain: "a11ywatch.com",
// pageUrl: "http://www.a11ywatch.com",
// url: "http://www.a11ywatch.com"
// }
@a11ywatch/website-source-builder
get pieces of data from a url
Installation
npm install @a11ywatch/website-source-builder
const { sourceBuild } = require("@a11ywatch/website-source-builder");
const data = sourceBuild("http://www.a11ywatch.com");
// output {
// cdnJsPath: `a11ywatch.com/www-a11ywatch-com-ada-fix.js`,
// cdnMinJsPath: `a11ywatch.com/www-a11ywatch-com-ada-fix.min.js`,
// cdnSourceStripped: "www-a11ywatch-com-ada-fix",
// domain: "a11ywatch.com",
// pageUrl: "http://www.a11ywatch.com",
// url: "http://www.a11ywatch.com"
// }