mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 09:36:52 +03:00
Add sourcemaps support to Gulp (#4089)
fixes https://github.com/cookiecutter/cookiecutter-django/issues/4045
This commit is contained in:
parent
23b41967a8
commit
be8aa5c73d
1
{{cookiecutter.project_slug}}/.gitignore
vendored
1
{{cookiecutter.project_slug}}/.gitignore
vendored
|
@ -346,4 +346,5 @@ project.css
|
||||||
project.min.css
|
project.min.css
|
||||||
vendors.js
|
vendors.js
|
||||||
*.min.js
|
*.min.js
|
||||||
|
*.min.js.map
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -85,13 +85,13 @@ function scripts() {
|
||||||
|
|
||||||
// Vendor Javascript minification
|
// Vendor Javascript minification
|
||||||
function vendorScripts() {
|
function vendorScripts() {
|
||||||
return src(paths.vendorsJs)
|
return src(paths.vendorsJs, { sourcemaps: true })
|
||||||
.pipe(concat('vendors.js'))
|
.pipe(concat('vendors.js'))
|
||||||
.pipe(dest(paths.js))
|
.pipe(dest(paths.js))
|
||||||
.pipe(plumber()) // Checks for errors
|
.pipe(plumber()) // Checks for errors
|
||||||
.pipe(uglify()) // Minifies the js
|
.pipe(uglify()) // Minifies the js
|
||||||
.pipe(rename({ suffix: '.min' }))
|
.pipe(rename({ suffix: '.min' }))
|
||||||
.pipe(dest(paths.js))
|
.pipe(dest(paths.js, { sourcemaps: '.' }))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Image compression
|
// Image compression
|
||||||
|
|
Loading…
Reference in New Issue
Block a user