Revert "Removing separate SVG CSS rendering"

This reverts commit e9a0def7d8.
This commit is contained in:
Jeff Avallone 2016-05-31 08:34:29 -04:00
parent e98f55bee9
commit c4d35d8451

View File

@ -64,13 +64,16 @@ gulp.task('static', 'Build static files into ./build directory.', function() {
.pipe(gulp.dest(config.buildRoot));
});
gulp.task('markup', 'Build markup into ./build directory.', function() {
gulp.task('markup', 'Build markup into ./build directory.', ['markup:svg_styles'], function() {
return gulp.src(config.globs.templates)
.pipe(frontMatter())
.pipe(hb({
data: config.globs.data,
helpers: config.globs.helpers,
partials: config.globs.partials,
partials: _.flatten([
config.globs.partials,
'./tmp/build/svg_styles.hbs'
]),
parsePartialName: function(option, file) {
return _.last(file.path.split(/\\|\//)).replace('.hbs', '');
},
@ -81,6 +84,21 @@ gulp.task('markup', 'Build markup into ./build directory.', function() {
.pipe(gulp.dest(config.buildRoot));
});
gulp.task('markup:svg_styles', false, function() {
return gulp.src('./src/sass/svg.scss')
.pipe(sass({
includePaths: bourbon.includePaths,
outputStyle: 'compressed'
}))
.on('error', notify.onError())
.pipe(rename({
dirname: '',
basename: 'svg_styles',
extname: '.hbs'
}))
.pipe(gulp.dest('./tmp/build'))
});
gulp.task('styles', 'Build stylesheets into ./build directory.', function() {
return gulp.src('./src/sass/main.scss', { base: '.' })
.pipe(sourcemaps.init())