Vue.js
0
Вклад в тег
gulp.task('dev', function() {
return browserify({ entries: ['src/app/main.js']})
//.transform(babelify, { presets: ['es2015'] })
.transform(vueify)
.plugin('vueify/plugins/extract-css', { out: './bundle.css' })
.bundle()
.pipe(source('main.js'))
.pipe(gulp.dest('./dist'))
//.pipe(connect.reload());
});
{
test: /\.svg((\?.*)?|$)/,
loaders: [
'url-loader',
'svg-fill-loader?selector=.svg-fill' // `selector` option will be used for all images processed by loader
]
},
$main-color: red;
@mixin apply-background-image($url, $color) {
$base-color: str-slice(inspect($color), 2);
background-image: unquote('url("' + $url + "?fill=%23" + $base-color +'")');
}
item {
@include apply-background-image("./../assets/svg/item.svg", $main-color);
}