mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-03 13:14:28 +03:00
Always use const
instead of var
in gulpfile.js
(#3786)
This commit is contained in:
parent
9ccee8349e
commit
071a4d2458
|
@ -42,7 +42,7 @@ function pathsConfig(appName) {
|
|||
}
|
||||
}
|
||||
|
||||
var paths = pathsConfig()
|
||||
const paths = pathsConfig()
|
||||
|
||||
////////////////////////////////
|
||||
// Tasks
|
||||
|
@ -50,12 +50,12 @@ var paths = pathsConfig()
|
|||
|
||||
// Styles autoprefixing and minification
|
||||
function styles() {
|
||||
var processCss = [
|
||||
const processCss = [
|
||||
autoprefixer(), // adds vendor prefixes
|
||||
pixrem(), // add fallbacks for rem units
|
||||
]
|
||||
|
||||
var minifyCss = [
|
||||
const minifyCss = [
|
||||
cssnano({ preset: 'default' }) // minify result
|
||||
]
|
||||
|
||||
|
@ -104,7 +104,7 @@ function imgCompression() {
|
|||
{%- if cookiecutter.use_async == 'y' -%}
|
||||
// Run django server
|
||||
function asyncRunServer() {
|
||||
var cmd = spawn('gunicorn', [
|
||||
const cmd = spawn('gunicorn', [
|
||||
'config.asgi', '-k', 'uvicorn.workers.UvicornWorker', '--reload'
|
||||
], {stdio: 'inherit'}
|
||||
)
|
||||
|
@ -115,7 +115,7 @@ function asyncRunServer() {
|
|||
{%- else %}
|
||||
// Run django server
|
||||
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) {
|
||||
console.log('runServer exited with code ' + code)
|
||||
cb(code)
|
||||
|
|
Loading…
Reference in New Issue
Block a user