GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 0006c6...b18562 )
by Simon
04:31 queued 02:15
created

gulpfile.js (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
const gulp = require('gulp'),
2
    plugins = require('gulp-load-plugins')(),
3
    argv = require('yargs').argv,
4
    dotenv = require('dotenv').load();
0 ignored issues
show
The constant dotenv seems to be never used. Consider removing it.
Loading history...
5
6
/* OPTIONS */
7
var options = {
8
    notifications: true,
9
    url: process.env.WP_HOME
10
};
11
12
/* PATHS */
13
var paths = {};
14
paths.THEME_PATH = './web/app/themes/stash/';
15
paths.SRC_PATH = paths.THEME_PATH + 'src/';
16
paths.IMAGE_PATH = paths.SRC_PATH + 'images/';
17
paths.ICON_FONT_PATH = paths.SRC_PATH + 'icon-font/';
18
paths.DIST_PATH = paths.THEME_PATH + 'dist/';
19
20
/* PLUGINS */
21
plugins.neat = require('node-neat').includePaths;
22
plugins.bourbon = require('node-bourbon').includePaths;
23
plugins.Sassburgers = require.resolve('sass-burger');
24
25
plugins.pngquant = require('imagemin-pngquant');
26
plugins.browserSync = require('browser-sync').create();
27
28
plugins.interceptErrors = function (error) {
0 ignored issues
show
The parameter error is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
29
    var args = Array.prototype.slice.call(arguments);
30
31
    // Send error to notification center with gulp-notify
32
    plugins.notify.onError({
33
        title: 'Compile Error',
34
        message: '<%= error.message %>'
35
    }).apply(this, args);
36
37
    // Keep gulp from hanging on this task
38
    this.emit('end');
39
};
40
41
options.production = !!argv.production;
42
43
/* TASKS */
44
var sass = require('./gulp/tasks/sass.js')(gulp, paths, plugins, options, 'sass/main.scss', '/css');
45
var js = require('./gulp/tasks/js.js')(gulp, paths, plugins, options);
46
var fonts = require('./gulp/tasks/fonts.js')(gulp, paths, plugins);
47
var svgFont = require('./gulp/tasks/svgFont.js')(gulp, paths, plugins, options);
48
var imagemin = require('./gulp/tasks/imagemin.js')(gulp, paths, plugins, options);
49
var browserSync = require('./gulp/tasks/browserSync.js')(gulp, paths, plugins, options);
50
51
gulp.task('sass', sass);
52
53
gulp.task('js', js);
54
gulp.task('fonts', fonts);
55
gulp.task('imagemin', imagemin);
56
gulp.task('svg-font', svgFont);
57
gulp.task('browser-sync', browserSync);
58
59
gulp.task('watch', function () {
60
    plugins.watch(paths.SRC_PATH + '**/*.scss', function () {
61
        gulp.start('sass');
62
    });
63
64
    plugins.watch(paths.IMAGE_PATH + ['**/*.*'], function () {
65
        gulp.start('imagemin');
66
    });
67
68
    plugins.watch(paths.SRC_PATH + 'fonts/**', function () {
69
        gulp.start('fonts');
70
    });
71
72
    plugins.watch(paths.ICON_FONT_PATH + ['**/*.*'], function () {
73
        gulp.start('svg-font');
74
    });
75
});
76
77
gulp.task('default', ['build', 'browser-sync', 'watch']);
78
gulp.task('build', ['sass', 'js', 'fonts', 'imagemin', 'svg-font']);