vamtiger-get-stylesheet-paths

Get a list of css paths for defined HTML document text.

Usage no npm install needed!

<script type="module">
  import vamtigerGetStylesheetPaths from 'https://cdn.skypack.dev/vamtiger-get-stylesheet-paths';
</script>

README

VAMTIGER Get Stylesheet Paths

VAMTIGER Get Stylesheet Paths will return a list of stylesheet paths for defined HTML document text.

Installation

VAMTIGER Get Stylesheet Paths can be installed using npm or yarn:

npm i --save vamtiger-get-stylesheet-paths

or

yarn add vamtiger-get-stylesheet-paths

Usage

Import or require a referece to VAMTIGER Get Stylesheet Paths:

import getStylesheetPaths from 'vamtiger-get-stylesheet-paths';

or

const getStylesheetPaths = require('vamtiger-get-stylesheet-paths').default;

VAMTIGER Get Stylesheet Paths will return a list of stylesheet paths for defined HTML document text.

const getStylesheetPaths = require('vamtiger-get-stylesheet-paths').default

const html = `
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>
        Some HTML Title
    </title>
    <link href="some/stylesheet/link/index.css" rel="stylesheet">
    <link href="another/stylesheet/link/index.css" rel="stylesheet">
    <link href="https://yet/another/stylesheet/link/index.css" rel="stylesheet">
</head>
<body>
    <div>
        Some HTML body inner HTML
    </div>
</body>
</html>
`;
const stylesheetPaths = getStylesheetPaths({ html });
/* [
'some/stylesheet/link/index.css',
'another/stylesheet/link/index.css',
'https://yet/another/stylesheet/link/index.css'
] */