mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-03 11:53:22 +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
|
// 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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user