Inline SVGs in CSS file

master
Alexander Surma 2015-04-16 12:55:04 +01:00
parent 87b6ce6c52
commit 83f2c2b2f7
2 changed files with 13 additions and 0 deletions

View File

@ -96,6 +96,9 @@ gulp.task('styles:dev', ['fonts'], function () {
precision: 10,
onError: console.error.bind(console, 'Sass error:')
}))
.pipe($.base64({
extensionsAllowed: ['.svg'],
}))
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
.pipe(gulp.dest('.tmp/styles'))
.pipe($.size({title: 'styles'}));
@ -113,6 +116,9 @@ gulp.task('styletemplates', function () {
precision: 10,
onError: console.error.bind(console, 'Sass error:')
}))
.pipe($.base64({
extensionsAllowed: ['.svg'],
}))
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
.pipe(gulp.dest('.tmp'))
// Concatenate Styles
@ -139,6 +145,9 @@ gulp.task('styles', ['styletemplates'], function () {
precision: 10,
onError: console.error.bind(console, 'Sass error:')
}))
.pipe($.base64({
extensionsAllowed: ['.svg'],
}))
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
.pipe(gulp.dest('.tmp'))
// Concatenate Styles
@ -311,6 +320,9 @@ gulp.task('demos', function () {
precision: 10,
onError: console.error.bind(console, 'Sass error:')
})))
.pipe($.base64({
extensionsAllowed: ['.svg'],
}))
.pipe($.if('*.css', $.autoprefixer(AUTOPREFIXER_BROWSERS)))
.pipe(gulp.dest('docs/out/components'));
});

View File

@ -20,6 +20,7 @@
"del": "^1.1.1",
"gulp": "^3.8.11",
"gulp-autoprefixer": "^2.0.0",
"gulp-base64": "^0.1.2",
"gulp-cache": "^0.2.6",
"gulp-changed": "^1.0.0",
"gulp-concat": "^2.4.1",