Skip to content

Commit

Permalink
Merge branch 'hotfix/1.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Igloczek committed Jun 21, 2017
2 parents 4cfb981 + b8d0896 commit fb21ddc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "snowdog/frontools",
"description": "Set of front-end tools for Magento 2, based on Gulp.js",
"version": "1.5.0",
"version": "1.5.1",
"license": "MIT",
"type": "magento2-component"
}
7 changes: 3 additions & 4 deletions config/svg-sprite.yml.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
mode:
symbol:
dest: 'images'
sprite: 'icons-sprite.svg'
symbol:
dest: 'images'
sprite: 'icons-sprite.svg'
13 changes: 11 additions & 2 deletions helper/svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ module.exports = function(gulp, plugins, config, name) { // eslint-disable-line
dest = [],
svgConfig = require('../helper/config-loader')('svg-sprite.yml', plugins, config);

plugins.path = require('path');

theme.locale.forEach(locale => {
dest.push(config.projectPath + theme.dest + '/' + locale);
});

return gulp.src(srcBase + '/**/icons/**/*.svg', { base: srcBase })
return gulp.src(srcBase + '/**/icons/**/*.svg')
.pipe(
plugins.if(
!plugins.util.env.ci,
Expand All @@ -18,7 +20,14 @@ module.exports = function(gulp, plugins, config, name) { // eslint-disable-line
})
)
)
.pipe(plugins.svgSprite(svgConfig))
.pipe(plugins.svgSprite({
shape: {
id: {
generator: file => plugins.path.basename(file, '.svg')
}
},
mode: svgConfig
}))
.pipe(plugins.multiDest(dest))
.pipe(plugins.logger({
display : 'name',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "magento2-frontools",
"version": "1.5.1",
"author": {
"name": "Bartek Igielski",
"email": "[email protected]"
Expand Down

0 comments on commit fb21ddc

Please sign in to comment.