Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #73 from fourkitchens/SVG-method-switch
Browse files Browse the repository at this point in the history
Switch SVG sprite to use symbol mode
  • Loading branch information
Evan Willhite authored May 8, 2018
2 parents 08c8779 + 117fd3a commit 9ec1e81
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
29 changes: 9 additions & 20 deletions gulp-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,17 @@
includePaths: (['./node_modules']),
},
iconConfig: {
shape: {
dimension: {
maxWidth: 15,
maxHeight: 15,
},
spacing: {
padding: 10,
},
},
mode: {
css: {
bust: false,
dest: '../../dist',
prefix: '@mixin sprite-%s',
render: {
scss: {
dest: '../components/_patterns/01-atoms/04-images/icons/_icon_sprite.scss',
template: 'node_modules/emulsify-gulp/gulp-tasks/svg-icons/sprite.scss.handlebars',
},
},
},
symbol: { // symbol mode to build the SVG
dest: 'dist/img/sprite', // destination foldeer
sprite: 'sprite.svg', // sprite name
example: false // Don't build sample page
}
},
svg: {
xmlDeclaration: false, // strip out the XML attribute
doctypeDeclaration: false // don't include the !DOCTYPE declaration
}
},
patternLab: {
enabled: true,
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ module.exports = (gulp, config) => {
gulp.task('icons', () => {
gulp.src('**/*.svg', { cwd: `${config.paths.img}/icons/src` })
.pipe(svgSprite(config.iconConfig))
.pipe(gulp.dest(`${config.themeDir}/images/icons`));
.pipe(gulp.dest('.'));
});

tasks.compile.push('icons');
Expand Down

0 comments on commit 9ec1e81

Please sign in to comment.