extract-style

0.0.0 • Public • Published

Introduction

Extract stlye.

Start

npm install -g extract-style

Example

<!-- index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div style="width: 100px; height: 100px; background-color: red"></div>
</body>
</html>

run

extract-style -i ./index.html -o ./target

result

<!-- index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
	<link rel="stylesheet" href="./index.css">
</head>
<body>
  <div class="LvSrfUQYSuDYoMKBgHfJuZJVhlPgTLyK"></div>
</body>
</html>
/* index.css */
.LvSrfUQYSuDYoMKBgHfJuZJVhlPgTLyK {width:100px;height:100px;background-color:red}

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i extract-style

    Weekly Downloads

    0

    Version

    0.0.0

    License

    MIT

    Unpacked Size

    3.8 kB

    Total Files

    7

    Last publish

    Collaborators

    • xnorain001