https://github.com/torann/laravel-elixir-fingerprint
A Laravel Elixir Extension to update fingerprinted assets from a rev-manifest.json file
https://github.com/torann/laravel-elixir-fingerprint
Last synced: about 2 months ago
JSON representation
A Laravel Elixir Extension to update fingerprinted assets from a rev-manifest.json file
- Host: GitHub
- URL: https://github.com/torann/laravel-elixir-fingerprint
- Owner: Torann
- Created: 2015-02-14T23:17:43.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-11T17:21:15.000Z (over 9 years ago)
- Last Synced: 2025-03-21T08:34:52.487Z (2 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laravel Elixir Fingerprint [](https://travis-ci.org/vincentmac/gulp-fingerprint)
### Install
```sh
$ npm install laravel-elixir-fingerprint --save-dev
```> For Laravel Elixir 2 use version 0.3.3
### Example
```javascript
var elixir = require('laravel-elixir');require('laravel-elixir-fingerprint');
elixir(function (mix) {
mix.fingerprint([
'public/build/css/*.css'
], {
output: 'public/build/css/'
});
});
```Our `rev-manifest.json` file:
```json
{
"fonts/fontello.eot": "fonts/fontello-ee7f7979.eot",
"fonts/fontello.svg": "fonts/fontello-9cc6a21a.svg",
"fonts/fontello.ttf": "fonts/fontello-13276407.ttf",
"fonts/fontello.woff": "fonts/fontello-e25c919d.woff"
}
```CSS Before Fingerprinting:
```css
@font-face {
font-family: 'fontello';
src: url("fonts/fontello.eot");
src: url("fonts/fontello.eot") format('embedded-opentype'),
url("fonts/fontello.woff") format('woff'),
url("fonts/fontello.ttf") format('truetype'),
url("fonts/fontello.svg") format('svg');
font-weight: normal;
font-style: normal;
}
```CSS After Fingerprinting:
```css
@font-face {
font-family: 'fontello';
src: url("/build/fonts/fontello-ee7f7979.eot");
src: url("/build/fonts/fontello-ee7f7979.eot") format('embedded-opentype'),
url("/build/fonts/fontello-e25c919d.woff") format('woff'),
url("/build/fonts/fontello-13276407.ttf") format('truetype'),
url("/build/fonts/fontello-9cc6a21a.svg") format('svg');
font-weight: normal;
font-style: normal;
}
```As you can see, the after shows the font files replaced with the versioned ones in the `rev-manifest.json` file.
### Full Documentation
[https://github.com/vincentmac/gulp-fingerprint](https://github.com/vincentmac/gulp-fingerprint)
## License
[MIT](http://opensource.org/licenses/MIT) © [Vincent Mac](http://simplicity.io)