mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-10 19:57:09 +03:00
Fix linting issues in Gulpfile
This commit is contained in:
parent
e08b17a234
commit
382dce2803
|
@ -29,14 +29,14 @@ function pathsConfig(appName) {
|
|||
const vendorsRoot = 'node_modules'
|
||||
|
||||
return {
|
||||
{% if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
||||
{%- if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
||||
bootstrapSass: `${vendorsRoot}/bootstrap/scss`,
|
||||
vendorsJs: [
|
||||
`${vendorsRoot}/jquery/dist/jquery.slim.js`,
|
||||
`${vendorsRoot}/popper.js/dist/umd/popper.js`,
|
||||
`${vendorsRoot}/bootstrap/dist/js/bootstrap.js`,
|
||||
],
|
||||
{% endif %}
|
||||
{%- endif %}
|
||||
app: this.app,
|
||||
templates: `${this.app}/templates`,
|
||||
css: `${this.app}/static/css`,
|
||||
|
@ -67,9 +67,9 @@ function styles() {
|
|||
return src(`${paths.sass}/project.scss`)
|
||||
.pipe(sass({
|
||||
includePaths: [
|
||||
{% if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
||||
{%- if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
||||
paths.bootstrapSass,
|
||||
{% endif %}
|
||||
{%- endif %}
|
||||
paths.sass
|
||||
]
|
||||
}).on('error', sass.logError))
|
||||
|
@ -90,7 +90,7 @@ function scripts() {
|
|||
.pipe(dest(paths.js))
|
||||
}
|
||||
|
||||
{% if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
||||
{%- if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
||||
// Vendor Javascript minification
|
||||
function vendorScripts() {
|
||||
return src(paths.vendorsJs)
|
||||
|
@ -101,7 +101,7 @@ function vendorScripts() {
|
|||
.pipe(rename({ suffix: '.min' }))
|
||||
.pipe(dest(paths.js))
|
||||
}
|
||||
{% endif %}
|
||||
{%- endif %}
|
||||
|
||||
// Image compression
|
||||
function imgCompression() {
|
||||
|
@ -110,7 +110,7 @@ function imgCompression() {
|
|||
.pipe(dest(paths.images))
|
||||
}
|
||||
|
||||
{% if cookiecutter.use_async == 'y' -%}
|
||||
{%- if cookiecutter.use_async == 'y' -%}
|
||||
// Run django server
|
||||
function asyncRunServer() {
|
||||
var cmd = spawn('gunicorn', [
|
||||
|
@ -143,7 +143,7 @@ function initBrowserSync() {
|
|||
// https://www.browsersync.io/docs/options/#option-proxy
|
||||
{%- if cookiecutter.use_docker == 'n' %}
|
||||
proxy: 'localhost:8000'
|
||||
{% else %}
|
||||
{%- else %}
|
||||
proxy: {
|
||||
target: 'django:8000',
|
||||
proxyReq: [
|
||||
|
@ -172,7 +172,7 @@ function watchPaths() {
|
|||
const generateAssets = parallel(
|
||||
styles,
|
||||
scripts,
|
||||
{% if cookiecutter.custom_bootstrap_compilation == 'y' %}vendorScripts,{% endif %}
|
||||
{%- if cookiecutter.custom_bootstrap_compilation == 'y' %}vendorScripts,{% endif %}
|
||||
imgCompression
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user