From 032a60f6532cd852b3c43fa8e67391b42b71327f Mon Sep 17 00:00:00 2001 From: Pek5892 Date: Tue, 12 Mar 2024 17:12:56 +0100 Subject: [PATCH] Fix dipendenze pdf.js --- gulpfile.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 1b9425289..7a83c5e8b 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -395,24 +395,17 @@ function csrf() { } function pdfjs() { - // Elenca tutte le cartelle dentro public e salva in una variabile l'ultima - const nodeModules = fs.readdirSync(config.nodeDirectory + '/pdf.js/public/',) - .filter(function (x) { - return x.indexOf('.') !== 0 && fs.statSync(config.nodeDirectory + '/pdf.js/public/' + x).isDirectory(); - }) - distDirectory = config.nodeDirectory + '/pdf.js/public/' + nodeModules[nodeModules.length - 1]; - const web = gulp.src([ - distDirectory + '/web/**/*', - '!' + distDirectory + '/web/cmaps/*', - '!' + distDirectory + '/web/*.map', - '!' + distDirectory + '/web/*.pdf', + config.nodeDirectory + '/pdf.js/demo/vue/public/pdfjs-prebuilt/web/**/*', + '!' + config.nodeDirectory + '/pdf.js/demo/vue/public/pdfjs-prebuilt/web/cmaps/*', + '!' + config.nodeDirectory + '/pdf.js/demo/vue/public/pdfjs-prebuilt/web/*.map', + '!' + config.nodeDirectory + '/pdf.js/demo/vue/public/pdfjs-prebuilt/web/*.pdf', ]) .pipe(gulp.dest(config.production + '/pdfjs/web')); const build = gulp.src([ - distDirectory + '/build/*', - '!' + distDirectory + '/build/*.map', + config.nodeDirectory + '/pdf.js/demo/vue/public/pdfjs-prebuilt/build/*', + '!' + config.nodeDirectory + '/pdf.js/demo/vue/public/pdfjs-prebuilt/build/*.map', ]) .pipe(gulp.dest(config.production + '/pdfjs/build'));