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