https://github.com/djaler/project-digest-webpack-plugin
Webpack plugin to generate file with digest of all project assets
https://github.com/djaler/project-digest-webpack-plugin
webpack
Last synced: about 2 months ago
JSON representation
Webpack plugin to generate file with digest of all project assets
- Host: GitHub
- URL: https://github.com/djaler/project-digest-webpack-plugin
- Owner: Djaler
- License: mit
- Created: 2018-12-18T08:38:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-08-18T20:09:53.000Z (almost 6 years ago)
- Last Synced: 2025-09-03T09:40:17.844Z (10 months ago)
- Topics: webpack
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Project Digest Webpack Plugin
Webpack plugin to generate file with digest of all project assets.
## Install
```bash
npm install --save-dev project-digest-webpack-plugin
```
## Usage
In your webpack configuration:
```javascript
const ProjectDigestPlugin = require('project-digest-webpack-plugin');
module.exports = {
// ...
plugins: [
new ProjectDigestPlugin('digest', {
algorithm: 'md5'
})
]
}
```
This will produce file "digest" in your output directory with digest, based on all project assets:
```
dc829bf0d79e690c59cee708b527e6b7
```
# Configuration
- `algorithm` - Hash algorithm used to generate digest. You can use all algorithms, compatible with [crypto.createHash](https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm_options).
Examples are 'sha256' (default), 'sha512', etc.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/djaler/project-digest-webpack-plugin.
## License
The package is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).