Skip to content

Commit

Permalink
Merged hotfix/1.3.7 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Igloczek committed Mar 4, 2017
2 parents 55e013d + cfd40d1 commit 07989d6
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 21 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.3.6",
"version": "1.3.7",
"license": "MIT",
"type": "magento2-component"
}
58 changes: 39 additions & 19 deletions helper/scss.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,22 @@ module.exports = function(gulp, plugins, config, name, file) { // eslint-disable
});

return gulp.src(
file || srcBase + '/**/*.scss',
{ base: srcBase }
file || srcBase + '/**/*.scss',
{ base: srcBase }
)
.pipe(
plugins.if(
!plugins.util.env.ci,
plugins.plumber({
errorHandler: plugins.notify.onError('Error: <%= error.message %>')
})
)
)
.pipe(plugins.plumber({ errorHandler: plugins.notify.onError('Error: <%= error.message %>') }))
.pipe(plugins.if(!disableMaps, plugins.sourcemaps.init()))
.pipe(plugins.sass())
.pipe(
plugins.sass()
.on('error', plugins.sassError.gulpSassError(plugins.util.env.ci || false))
)
.pipe(plugins.if(production, plugins.postcss([plugins.cssnano()])))
.pipe(plugins.if(postcss.length, plugins.postcss(postcss || [])))
.pipe(plugins.if(!disableMaps, plugins.sourcemaps.write()))
Expand All @@ -60,21 +70,31 @@ module.exports = function(gulp, plugins, config, name, file) { // eslint-disable
file || srcBase + '/' + locale + '/**/*.scss',
{ base: srcBase + '/' + locale }
)
.pipe(plugins.plumber({ errorHandler: plugins.notify.onError('Error: <%= error.message %>') }))
.pipe(plugins.if(!disableMaps, plugins.sourcemaps.init()))
.pipe(plugins.sass())
.pipe(plugins.if(production, plugins.postcss([plugins.cssnano()])))
.pipe(plugins.if(postcss.length, plugins.postcss(postcss || [])))
.pipe(plugins.if(!disableMaps, plugins.sourcemaps.write()))
.pipe(plugins.if(production, plugins.rename({ suffix: '.min' })))
.pipe(plugins.rename(adjustDestinationDirectory))
.pipe(gulp.dest(config.projectPath + theme.dest + '/' + locale))
.pipe(plugins.logger({
display : 'name',
beforeEach: 'Theme: ' + name + ' Locale: ' + locale + ' ',
afterEach : ' Compiled!'
}))
.pipe(plugins.browserSync.stream())
.pipe(
plugins.if(
!plugins.util.env.ci,
plugins.plumber({
errorHandler: plugins.notify.onError('Error: <%= error.message %>')
})
)
)
.pipe(plugins.if(!disableMaps, plugins.sourcemaps.init()))
.pipe(
plugins.sass()
.on('error', plugins.sassError.gulpSassError(plugins.util.env.ci || false))
)
.pipe(plugins.if(production, plugins.postcss([plugins.cssnano()])))
.pipe(plugins.if(postcss.length, plugins.postcss(postcss || [])))
.pipe(plugins.if(!disableMaps, plugins.sourcemaps.write()))
.pipe(plugins.if(production, plugins.rename({ suffix: '.min' })))
.pipe(plugins.rename(adjustDestinationDirectory))
.pipe(gulp.dest(config.projectPath + theme.dest + '/' + locale))
.pipe(plugins.logger({
display : 'name',
beforeEach: 'Theme: ' + name + ' Locale: ' + locale + ' ',
afterEach : ' Compiled!'
}))
.pipe(plugins.browserSync.stream())
);
});
return streams;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"gulp-rename": "~1.2.2",
"gulp-rimraf": "~0.2.1",
"gulp-sass": "~3.1.0",
"gulp-sass-error": "~1.0.4",
"gulp-sass-lint": "~1.3.2",
"gulp-sourcemaps": "~2.4.1",
"gulp-task-loader": "~1.4.4",
Expand Down
8 changes: 7 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1841,6 +1841,12 @@ gulp-rimraf@~0.2.1:
rimraf "^2.5.4"
through2 "^2.0.1"

gulp-sass-error@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/gulp-sass-error/-/gulp-sass-error-1.0.4.tgz#5a959a4e9cd1ce1f7a7d645bdb24be35e1e0f541"
dependencies:
gulp-util "^3.0.7"

gulp-sass-lint@~1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/gulp-sass-lint/-/gulp-sass-lint-1.3.2.tgz#642094c5fe9b9196872f33a0d1f75ccf51cb8361"
Expand Down Expand Up @@ -2756,7 +2762,7 @@ meow@^3.3.0, meow@^3.7.0:
redent "^1.0.0"
trim-newlines "^1.0.0"

merge-stream@^1.0.0, merge-stream@^1.0.1:
merge-stream@^1.0.0, merge-stream@~1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1"
dependencies:
Expand Down

0 comments on commit 07989d6

Please sign in to comment.