【文件属性】:
文件名称:css-urls:获取样式表文件中引用的所有URL
文件大小:11KB
文件格式:ZIP
更新时间:2021-04-14 09:25:43
JavaScript
css-urls
获取样式表中的所有URL
安装
$ npm install css-urls --save
用法
const got = require ( 'got' )
const cssUrls = require ( 'css-urls' )
; ( async ( ) => {
const url = process . argv [ 2 ]
if ( ! url ) throw new TypeError ( 'Need to provide an url as first argument.' )
const text = await got ( url , { resolveBodyOnly : true } )
const links = cssUrls ( { text , url } )
links . forEach ( ( { url ,
【文件预览】:
css-urls-master
----.travis.yml(776B)
----package.json(3KB)
----test()
--------index.js(2KB)
--------snapshots()
--------fixtures()
----LICENSE(1KB)
----src()
--------index.js(528B)
----.gitignore(458B)
----CHANGELOG.md(2KB)
----.npmrc(59B)
----README.md(2KB)
----.editorconfig(365B)
----.gitattributes(12B)