Skip to content

Commit 24d884a

Browse files
committed
feat: aggiunta possibilità di includere da gulpfile.js plugin personalizzati per ckeditor
1 parent cde389b commit 24d884a

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

gulpfile.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,19 +359,24 @@ function srcFonts() {
359359

360360
function ckeditor() {
361361

362-
const ckeditor = gulp.src([
362+
const ckeditorCore = gulp.src([
363363
config.nodeDirectory + '/ckeditor4/{adapters,lang,skins,plugins,core}/**/*.{js,json,css,png,gif,html}',
364364
config.nodeDirectory + '/ckeditor4/*.{js,css}',
365365
])
366366
.pipe(gulp.dest(config.production + '/' + config.paths.js + '/ckeditor'));
367367

368-
const plugins = gulp.src([
368+
const nodePlugins = gulp.src([
369369
config.nodeDirectory + '/ckeditor/plugins/{emoji,autocomplete,textmatch,textwatcher}/**/*.{js,json,css,png,gif,html}',
370-
config.nodeDirectory + '/ckeditor-image-to-base/*.{js,json,css,png,gif,html}',
371370
])
372371
.pipe(gulp.dest(config.production + '/' + config.paths.js + '/ckeditor/plugins'));
373372

374-
return merge(ckeditor, plugins);
373+
// Plugin personalizzati
374+
const customPlugins = gulp.src([
375+
config.development + '/' + config.paths.js + '/ckeditor/plugins/**/*' // Sorgente: assets/src/js/ckeditor/plugins/
376+
], { allowEmpty: true })
377+
.pipe(gulp.dest(config.production + '/' + config.paths.js + '/ckeditor/plugins')); // Destinazione: assets/dist/js/ckeditor/plugins/
378+
379+
return merge(ckeditorCore, nodePlugins, customPlugins); // Unione dei flussi
375380
}
376381

377382
function colorpicker() {

0 commit comments

Comments
 (0)