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
Pull Request — master (#60)
by
unknown
02:47
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
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
26
plugins.pngquant = require('imagemin-pngquant');
27
plugins.browserSync = require('browser-sync').create();
28
29
plugins.interceptErrors = function (error) {
30
    var args = Array.prototype.slice.call(arguments);
31
32
    // Send error to notification center with gulp-notify
33
    plugins.notify.onError({
34
        title: 'Compile Error',
35
        message: '<%= error.message %>'
36
    }).apply(this, args);
37
38
    // Keep gulp from hanging on this task
39
    this.emit('end');
40
};
41
42
options.production = !!argv.production;
43
44
/* TASKS */
45
var sass = require('./gulp/tasks/sass.js')(gulp, paths, plugins, options);
46
var js = require('./gulp/tasks/js.js')(gulp, paths, plugins, options);
47
var fonts = require('./gulp/tasks/fonts.js')(gulp, paths, plugins);
48
var svgFont = require('./gulp/tasks/svgFont.js')(gulp, paths, plugins, options);
49
var imagemin = require('./gulp/tasks/imagemin.js')(gulp, paths, plugins, options);
50
var browserSync = require('./gulp/tasks/browserSync.js')(gulp, paths, plugins, options);
51
52
gulp.task('sass', sass);
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', 'svg-font', 'imagemin']);