Upgraded imagemagick and manually altered pdf to image module to handle changes....
[yaffs-website] / web / modules / contrib / paragraphs / css / gulp-tasks.js
1 // Define gulp tasks.
2 module.exports = function(gulp, plugins, options) {
3
4   'use strict';
5
6   // Processor for linting is assigned to options so it can be reused later.
7   options.processors = [
8     // Options are defined in .stylelintrc.yaml file.
9     plugins.stylelint(options.stylelintOptions),
10     plugins.reporter(options.processorsOptions.reporterOptions)
11   ];
12
13   // Post CSS options.
14   options.postcssOptions = [
15     plugins.autoprefixer(options.autoprefixer)
16   ];
17
18   // Defining gulp tasks.
19
20   gulp.task('sass', function() {
21     return gulp.src(options.scssSrc + '/*.scss')
22       .pipe(plugins.sass({
23         outputStyle: 'expanded',
24         includePaths: options.sassIncludePaths
25       }))
26       .pipe(plugins.postcss(options.postcssOptions))
27       .pipe(gulp.dest(options.cssDest));
28   });
29
30   gulp.task('sass:lint', function () {
31     return gulp.src(options.scssSrc + '/*.scss')
32       .pipe(plugins.postcss(options.processors, {syntax: plugins.syntax_scss}))
33   });
34
35   // Default task to run everything in correct order.
36   gulp.task('default', ['sass:lint', 'sass']);
37 };