Skip to content

Commit 4611882

Browse files
committed
Updated readme
1 parent d9de932 commit 4611882

File tree

1 file changed

+9
-34
lines changed

1 file changed

+9
-34
lines changed

README.md

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,41 @@
11
# Laravel Elixir Icon fonts
22

3-
This is a simple [Spritesmith](https://github.com/twolfson/gulp.spritesmith) wrapper for [Laravel Elixir](https://github.com/laravel/elixir).
3+
This is a simple [gulp-iconfont](https://github.com/nfroidure/gulp-iconfont)
4+
and [gulp-iconfont-css](https://github.com/backflip/gulp-iconfont-css) wrapper for [Laravel Elixir](https://github.com/laravel/elixir).
45

56
## Install
67

78
Install this package over npm.
89

910
```sh
10-
npm install laravel-elixir-spritesmith --save-dev
11+
npm install laravel-elixir-fonts --save-dev
1112
```
1213

1314
Require it in your `gulpfile.js` and use it.
1415

1516
```javascript
1617
var elixir = require('laravel-elixir');
1718

18-
require('laravel-elixir-spritesmith');
19+
require('laravel-elixir-fonts');
1920

2021
elixir(function(mix) {
2122

22-
mix.spritesmith();
23+
mix.fonts([elixir.config.assetsPath + '/svg/**/*.svg'], elixir.config.publicPath + '/fonts/');
2324

2425
});
2526
```
2627

2728
## How To
2829

29-
If you run `mix.spritesmith()` without parameters, it looks for all PNG-Files in `resources/assets/img/sprites` (folders included).
30+
If you run `mix.fonts()` without parameters, it looks for all SVG-Files in `resources/assets/svg` (folders included).
3031

31-
The output of the `sprite.css` file is in `resources/assets/css`. The output of your `sprite.png` is in `public/assets/img`.
32+
The output of the `icons.css` file is in `resources/assets/css`.
33+
The output of your `fonts` is in `public/assets/fonts`.
3234

3335
These are the default paths, they can be overwritten by `elixir.config.assetsPath` and `elixir.config.css.outputFolder` or by pass options. See the [config](https://github.com/laravel/elixir/blob/master/Config.js) file from elixir for more options.
3436

3537
## Options
3638

37-
```javascript
38-
mix.spritesmith('src', {options});
39-
```
40-
41-
##### Change Source
42-
43-
```javascript
44-
mix.spritesmith('resources/assets/images');
45-
```
46-
47-
##### Change Output
39+
> Wonders are coming...
4840
49-
```javascript
50-
mix.spritesmith(null, {
51-
imgOutput: 'public/images',
52-
cssOutput: 'public/styles'
53-
});
54-
```
55-
56-
By default, you can use your sprite images with the class `sprite-{itemname}`. Change them with `cssOpt`.
57-
58-
```javascript
59-
mix.spritesmith(null, {
60-
cssVarMap: function (sprite) {
61-
sprite.name = 'MY-SPRITE-' + sprite.name;
62-
}
63-
}
64-
```
6541

66-
And you can use all other options from [Spritesmith](https://github.com/twolfson/gulp.spritesmith).

0 commit comments

Comments
 (0)