-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
30 lines (24 loc) · 840 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var glob = require('glob'),
gulp = require('gulp'),
gutil = require('gulp-util'),
gulpicon = require('gulpicon/tasks/gulpicon'),
elixir = require('laravel-elixir'),
config = elixir.config;
elixir.extend('gulpicon', function(src, output, options) {
config.svg = {
folder: 'svg',
outputFolder: 'svg',
};
var src = (src || config.get('assets.svg.folder')) + '/**/*.svg',
gulpicon_config = options || require("gulpicon/example/config.js");
gulpicon_config.dest = output || config.get('public.svg.outputFolder');
new elixir.Task('gulpicon', function(){
var files = glob.sync(src);
if (files.length > 0) {
(gulpicon(files, gulpicon_config))();
gutil.log('Finished gulpicon conversion');
}
}).watch([
src
]);
});