Skip to content

Commit

Permalink
Génère les fichiers .js.map pour *tous* les fichiers JS
Browse files Browse the repository at this point in the history
Requis pour pouvoir exécuter `manage.py collectstatic`
  • Loading branch information
philippemilink committed Mar 3, 2024
1 parent 78f37ea commit 7c8e067
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ async function jsLint() {
console.log(resultText)
}

// Get JS minified files from packages
/* Get JS minified files from packages
* Get also sourcemaps for all JS files, required by Django's ManifestStaticFilesStorage since 4.1 (see
* https://docs.djangoproject.com/fr/4.2/ref/contrib/staticfiles/#manifeststaticfilesstorage) */
function jsPackages() {
return gulp.src([
require.resolve('jquery/dist/jquery.min.js'),
Expand All @@ -126,8 +128,8 @@ function jsPackages() {
require.resolve('chartjs-adapter-moment/dist/chartjs-adapter-moment.min.js'),
require.resolve('chart.js/dist/chart.min.js'),
require.resolve('easymde/dist/easymde.min.js')
])
.pipe(gulp.dest('dist/js/'))
], { sourcemaps: true })
.pipe(gulp.dest('dist/js/', { sourcemaps: '.' }))
}

// Generates JS for the website
Expand Down

0 comments on commit 7c8e067

Please sign in to comment.