mirror of https://github.com/snachodog/mybuddy.git
Replace `var` with `const`/`let` in gulp configs
This commit is contained in:
parent
c0dd79ef19
commit
3b20aa01d1
|
@ -1,4 +1,4 @@
|
|||
var basePath = 'babybuddy/static/babybuddy/';
|
||||
const basePath = 'babybuddy/static/babybuddy/';
|
||||
|
||||
module.exports = {
|
||||
basePath: basePath,
|
||||
|
|
42
gulpfile.js
42
gulpfile.js
|
@ -1,18 +1,18 @@
|
|||
var gulp = require('gulp');
|
||||
const gulp = require('gulp');
|
||||
|
||||
var concat = require('gulp-concat');
|
||||
var del = require('del');
|
||||
var es = require('child_process').execSync;
|
||||
var flatten = require('gulp-flatten');
|
||||
var fontello = require('gulp-fontello');
|
||||
var pump = require('pump');
|
||||
var removeSourcemaps = require('gulp-remove-sourcemaps');
|
||||
var sass = require('gulp-sass')(require('sass'));
|
||||
var sassGlob = require('gulp-sass-glob');
|
||||
var styleLint = require('gulp-stylelint');
|
||||
var spawn = require('child_process').spawn;
|
||||
const concat = require('gulp-concat');
|
||||
const del = require('del');
|
||||
const es = require('child_process').execSync;
|
||||
const flatten = require('gulp-flatten');
|
||||
const fontello = require('gulp-fontello');
|
||||
const pump = require('pump');
|
||||
const removeSourcemaps = require('gulp-remove-sourcemaps');
|
||||
const sass = require('gulp-sass')(require('sass'));
|
||||
const sassGlob = require('gulp-sass-glob');
|
||||
const styleLint = require('gulp-stylelint');
|
||||
const spawn = require('child_process').spawn;
|
||||
|
||||
var config = require('./gulpfile.config.js');
|
||||
const config = require('./gulpfile.config.js');
|
||||
|
||||
/**
|
||||
* Support functions for Gulp tasks.
|
||||
|
@ -222,7 +222,7 @@ function styles(cb) {
|
|||
* @param cb
|
||||
*/
|
||||
function test(cb) {
|
||||
var command = [
|
||||
let command = [
|
||||
'run',
|
||||
'python',
|
||||
'manage.py',
|
||||
|
@ -275,12 +275,12 @@ function watch() {
|
|||
*/
|
||||
|
||||
gulp.task('collectstatic', function(cb) {
|
||||
var command = ['run', 'python', 'manage.py', 'collectstatic'];
|
||||
let command = ['run', 'python', 'manage.py', 'collectstatic'];
|
||||
|
||||
/* Use base settings if no settings parameter is supplied. */
|
||||
var parameters = process.argv.splice(3);
|
||||
var noSettings = true;
|
||||
for (var i = 0; i < parameters.length; i++) {
|
||||
const parameters = process.argv.splice(3);
|
||||
let noSettings = true;
|
||||
for (let i = 0; i < parameters.length; i++) {
|
||||
if (parameters[i].substring(0, 10) === '--settings') {
|
||||
noSettings = false;
|
||||
break;
|
||||
|
@ -323,15 +323,15 @@ gulp.task('reset', function(cb) {
|
|||
});
|
||||
|
||||
gulp.task('runserver', function(cb) {
|
||||
var command = ['run', 'python', 'manage.py', 'runserver'];
|
||||
let command = ['run', 'python', 'manage.py', 'runserver'];
|
||||
|
||||
/**
|
||||
* Process any parameters. Any arguments found here will be removed from
|
||||
* the parameters list so other parameters continue to be passed to the
|
||||
* command.
|
||||
**/
|
||||
var parameters = process.argv.splice(2);
|
||||
for (var i = 0; i < parameters.length; i++) {
|
||||
const parameters = process.argv.splice(2);
|
||||
for (let i = 0; i < parameters.length; i++) {
|
||||
/* May be included because this is the default gulp command. */
|
||||
if (parameters[i] === 'runserver') {
|
||||
delete parameters[i];
|
||||
|
|
Loading…
Reference in New Issue