asset-hash
Advanced tools
Comparing version 2.2.2 to 2.2.3
@@ -1,2 +0,2 @@ | ||
/*! asset-hash v2.2.2 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
/*! asset-hash v2.2.3 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/*! asset-hash v2.2.2 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
/*! asset-hash v2.2.3 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
import 'core-js/modules/es6.promise'; | ||
@@ -3,0 +3,0 @@ import 'core-js/modules/es6.regexp.to-string'; |
{ | ||
"name": "asset-hash", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"description": "Very fast asset hashing function for using e.g. during front-end deployments.", | ||
@@ -43,12 +43,12 @@ "main": "lib/index.cjs.js", | ||
"babel-jest": "^23.4.2", | ||
"babel-preset-edge": "^4.10.1", | ||
"eslint": "^5.3.0", | ||
"eslint-config-readable": "^2.1.3", | ||
"flow-bin": "^0.78.0", | ||
"jest": "^23.4.2", | ||
"preppy": "^4.3.1", | ||
"babel-preset-edge": "^4.11.1", | ||
"eslint": "^5.4.0", | ||
"eslint-config-readable": "^2.1.4", | ||
"flow-bin": "^0.79.1", | ||
"jest": "^23.5.0", | ||
"preppy": "^4.3.2", | ||
"prettier": "^1.14.2" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.0.0-rc.1", | ||
"@babel/runtime": "^7.0.0-rc.2", | ||
"big.js": "^5.1.2", | ||
@@ -55,0 +55,0 @@ "core-js": "^2.5.7", |
@@ -18,2 +18,21 @@ # _Asset Hash_ <br/>[![Sponsored by][sponsor-img]][sponsor] [![Version][npm-version-img]][npm] [![Downloads][npm-downloads-img]][npm] [![Build Status Unix][travis-img]][travis] [![Build Status Windows][appveyor-img]][appveyor] [![Dependencies][deps-img]][deps] | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
**Table of Contents** | ||
- [Installation](#installation) | ||
- [NPM](#npm) | ||
- [Yarn](#yarn) | ||
- [Speed](#speed) | ||
- [Usage](#usage) | ||
- [`getHash()`](#gethash) | ||
- [`getHashedName()`](#gethashedname) | ||
- [Class `Hasher`](#class-hasher) | ||
- [Webpack Example Config](#webpack-example-config) | ||
- [License](#license) | ||
- [Copyright](#copyright) | ||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
## Installation | ||
@@ -70,6 +89,4 @@ | ||
### `Hasher()` | ||
### Class `Hasher` | ||
The class is e.g. useful in e.g. [`output.hashFunction` in Webpack](https://webpack.js.org/configuration/output/#output-hashfunction) | ||
```js | ||
@@ -82,2 +99,25 @@ import { Hasher } from "asset-hash" | ||
### Webpack Example Config | ||
You can use the powerful hashing of AssetHash inside Webpack as well. This leads to a) better performance and b) shorter hashes. Here is an example configuration: | ||
```js | ||
import { Hasher } from "asset-hash" | ||
... | ||
output: { | ||
hashFunction: Hasher, | ||
hashDigest: "base52", | ||
hashDigestLength: 8 | ||
} | ||
... | ||
``` | ||
For more details please check the [official Webpack docs](https://webpack.js.org/configuration/output/#output-hashfunction). | ||
## License | ||
@@ -84,0 +124,0 @@ |
34280
129
Updated@babel/runtime@^7.0.0-rc.2