Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rev-file

Get the revved file path of a file

Reads the file, MD5-hashes it, truncates the hash to 10 characters, appends it to the filename, and returns the modified path.

Install

npm install rev-file

Usage

import {revisionFile} from 'rev-file';

console.log(await revisionFile('src/unicorn.png'));
//=> 'src/unicorn-bb9d8fe615.png'

API

revisionFile(filepath)

Returns a Promise for a revved file path.

revisionFileSync(filepath)

Returns a revved file path.

About

Get the revved file path of a file

Resources

Code of conduct

Contributing

Stars

35 stars

Watchers

5 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages