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 ( fec4fe...b16356 )
by Vincent
07:45 queued 05:15
created

gulpfile.js (1 issue)

Severity

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
'use strict';
2
3
var gulp = require('gulp'),
4
    plugins = require('gulp-load-plugins')(),
5
    argv = require('yargs').argv,
6
    dotenv = require('dotenv').load();
7
8
/* OPTIONS */
9
var options = {
10
    notifications: true,
11
    url: process.env.WP_HOME
12
};
13
14
/* PATHS */
15
var paths = {};
16
paths.THEME_PATH = './web/app/themes/stash/';
17
paths.SRC_PATH = paths.THEME_PATH + 'src/';
18
paths.IMAGE_PATH = paths.SRC_PATH + 'images/';
19
paths.ICON_FONT_PATH = paths.SRC_PATH + 'icon-font/';
20
paths.DIST_PATH = paths.THEME_PATH + 'dist/';
21
paths.BOWER_PATH = paths.THEME_PATH + 'bower/';
22
23
/* PLUGINS */
24
plugins.mainBowerFiles = require('main-bower-files');
25
plugins.neat = require('node-neat').includePaths;
26
plugins.browserify = require('browserify');
27
plugins.source = require('vinyl-source-stream');
28
plugins.buffer = require('vinyl-buffer');
29
plugins.pngquant = require('imagemin-pngquant');
30
plugins.babelify = require('babelify');
31
plugins.browserSync = require('browser-sync');
32
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...
33
    var args = Array.prototype.slice.call(arguments);
34
35
    // Send error to notification center with gulp-notify
36
    plugins.notify.onError({
37
        title: 'Compile Error',
38
        message: '<%= error.message %>'
39
    }).apply(this, args);
40
41
    // Keep gulp from hanging on this task
42
    this.emit('end');
43
};
44
45
options.production = !!argv.production;
46
47
/* TASKS */
48
var bower = require('./gulp/tasks/bower.js')(gulp, paths, plugins, options);
49
var sass = require('./gulp/tasks/sass.js')(gulp, paths, plugins, options);
50
var js = require('./gulp/tasks/js.js')(gulp, paths, plugins, options);
51
var imagemin = require('./gulp/tasks/imagemin.js')(gulp, paths, plugins, options);
52
var fonts = require('./gulp/tasks/fonts.js')(gulp, paths, plugins);
53
var svgFont = require('./gulp/tasks/svgFont.js')(gulp, paths, plugins, options);
54
var browserSync = require('./gulp/tasks/browserSync.js')(gulp, paths, plugins, options);
55
56
gulp.task('bower', bower);
57
gulp.task('sass', sass);
58
gulp.task('js', js);
59
gulp.task('imagemin', imagemin);
60
gulp.task('svg-font', svgFont);
61
gulp.task('fonts', fonts);
62
gulp.task('browser-sync', browserSync);
63
64
gulp.task('watch', function () {
65
    plugins.watch(paths.SRC_PATH + '**/*.scss', function () {
66
        gulp.start('sass');
67
    });
68
69
    plugins.watch(paths.SRC_PATH + '**/*.js', function () {
70
        gulp.start('js');
71
    });
72
73
    plugins.watch(paths.BOWER_PATH + '**/*.*', function () {
74
        gulp.start('bower');
75
    });
76
77
    plugins.watch(paths.IMAGE_PATH + ['**/*.*'], function () {
78
        gulp.start('imagemin');
79
    });
80
81
    plugins.watch(paths.SRC_PATH + 'fonts/**', function () {
82
        gulp.start('fonts');
83
    });
84
85
    plugins.watch(paths.ICON_FONT_PATH + ['**/*.*'], function () {
86
        gulp.start('svg-font');
87
    });
88
});
89
90
gulp.task('default', ['build', 'browser-sync', 'watch']);
91
gulp.task('build', ['sass', 'bower', 'js', 'fonts', 'imagemin']);