append-hash

0.2.3 • Public • Published

usage

index.src.html

<!DOCTYPE html>
<html>
    <head>
        <style>
            #box {
                background-image: url({{img/bg.jpg}});
            }
        </style> 
        <link href="{{css/style.css}}"/>
    </head>
    <body>
        <div id="box"></div>
        <script src="{{js/index.js}}"></script> 
    </body>
</html>

build.js

const hash = require('append-hash');
 
hash('index.src.html', 'index.html')

generating file hash

node build

console output

----- ./index.src.html -----
./img/bg.jpg -> b48e8d31f7357e630679
./css/style.css -> 6j4l3n3v56ik7lmpl02
./js/index.js -> 9j4k2ldfda7v02jlmu3
----- ./index.html -----

Readme

Keywords

Package Sidebar

Install

npm i append-hash

Weekly Downloads

2

Version

0.2.3

License

MIT

Last publish

Collaborators

  • flfwzgl