1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-23 22:03:18 +01:00

Fix dipendenze pdf.js

This commit is contained in:
Pek5892 2024-03-12 17:12:56 +01:00
parent 5ff6d4c427
commit 032a60f653

View File

@ -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'));