Always use const instead of var in gulpfile.js (#3786)

This commit is contained in:
Nikita Sobolev 2022-07-22 01:46:43 +03:00 committed by GitHub
parent 9ccee8349e
commit 071a4d2458
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ function pathsConfig(appName) {
} }
} }
var paths = pathsConfig() const paths = pathsConfig()
//////////////////////////////// ////////////////////////////////
// Tasks // Tasks
@ -50,12 +50,12 @@ var paths = pathsConfig()
// Styles autoprefixing and minification // Styles autoprefixing and minification
function styles() { function styles() {
var processCss = [ const processCss = [
autoprefixer(), // adds vendor prefixes autoprefixer(), // adds vendor prefixes
pixrem(), // add fallbacks for rem units pixrem(), // add fallbacks for rem units
] ]
var minifyCss = [ const minifyCss = [
cssnano({ preset: 'default' }) // minify result cssnano({ preset: 'default' }) // minify result
] ]
@ -104,7 +104,7 @@ function imgCompression() {
{%- if cookiecutter.use_async == 'y' -%} {%- if cookiecutter.use_async == 'y' -%}
// Run django server // Run django server
function asyncRunServer() { function asyncRunServer() {
var cmd = spawn('gunicorn', [ const cmd = spawn('gunicorn', [
'config.asgi', '-k', 'uvicorn.workers.UvicornWorker', '--reload' 'config.asgi', '-k', 'uvicorn.workers.UvicornWorker', '--reload'
], {stdio: 'inherit'} ], {stdio: 'inherit'}
) )
@ -115,7 +115,7 @@ function asyncRunServer() {
{%- else %} {%- else %}
// Run django server // Run django server
function runServer(cb) { function runServer(cb) {
var cmd = spawn('python', ['manage.py', 'runserver'], {stdio: 'inherit'}) const cmd = spawn('python', ['manage.py', 'runserver'], {stdio: 'inherit'})
cmd.on('close', function(code) { cmd.on('close', function(code) {
console.log('runServer exited with code ' + code) console.log('runServer exited with code ' + code)
cb(code) cb(code)