Initial commit
This commit is contained in:
651
resources/_keenthemes/tools/gulp.config.js
Normal file
651
resources/_keenthemes/tools/gulp.config.js
Normal file
@ -0,0 +1,651 @@
|
||||
const gulpConfig = {
|
||||
name: "metronic",
|
||||
desc: "Gulp build config",
|
||||
version: "8.1.8",
|
||||
config: {
|
||||
debug: false,
|
||||
compile: {
|
||||
rtl: {
|
||||
enabled: false,
|
||||
skip: [
|
||||
"select2",
|
||||
"keenicons",
|
||||
"line-awesome",
|
||||
"fontawesome5",
|
||||
"nouislider",
|
||||
"tinymce",
|
||||
"sweetalert2",
|
||||
],
|
||||
},
|
||||
jsMinify: false,
|
||||
cssMinify: false,
|
||||
jsSourcemaps: false,
|
||||
cssSourcemaps: false,
|
||||
},
|
||||
path: {
|
||||
src: "../src",
|
||||
common_src: "../src",
|
||||
node_modules: "node_modules",
|
||||
},
|
||||
dist: ["../../../public/assets"],
|
||||
},
|
||||
build: {
|
||||
base: {
|
||||
src: {
|
||||
styles: ["{$config.path.src}/sass/style.scss"],
|
||||
scripts: [
|
||||
"{$config.path.common_src}/js/components/**/*.js",
|
||||
"{$config.path.common_src}/js/layout/**/*.js",
|
||||
"{$config.path.src}/js/layout/**/*.js"
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
styles: "{$config.dist}/css/style.bundle.css",
|
||||
scripts: "{$config.dist}/js/scripts.bundle.js",
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
global: {
|
||||
src: {
|
||||
mandatory: {
|
||||
jquery: {
|
||||
scripts: ["{$config.path.node_modules}/jquery/dist/jquery.js"],
|
||||
},
|
||||
popperjs: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/@popperjs/core/dist/umd/popper.js",
|
||||
],
|
||||
},
|
||||
bootstrap: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/bootstrap/dist/js/bootstrap.min.js",
|
||||
],
|
||||
},
|
||||
moment: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/moment/min/moment-with-locales.min.js",
|
||||
],
|
||||
},
|
||||
wnumb: {
|
||||
scripts: ["{$config.path.node_modules}/wnumb/wNumb.js"],
|
||||
},
|
||||
},
|
||||
optional: {
|
||||
axios: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/axios/dist/axios.min.js"
|
||||
],
|
||||
},
|
||||
lozad: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/lozad/dist/lozad.min.js"
|
||||
],
|
||||
},
|
||||
select2: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/select2/dist/css/select2.css",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/select2/dist/js/select2.full.js",
|
||||
"{$config.path.common_src}/js/vendors/plugins/select2.init.js",
|
||||
],
|
||||
},
|
||||
"tempus-dominus": {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/@eonasdan/tempus-dominus/dist/css/tempus-dominus.min.css",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/@eonasdan/tempus-dominus/dist/js/tempus-dominus.min.js",
|
||||
"{$config.path.common_src}/js/vendors/plugins/tempus-dominus.init.js",
|
||||
"{$config.path.node_modules}/@eonasdan/tempus-dominus/dist/locales/de.js",
|
||||
"{$config.path.node_modules}/@eonasdan/tempus-dominus/dist/plugins/customDateFormat.js",
|
||||
],
|
||||
},
|
||||
flatpickr: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/flatpickr/dist/flatpickr.css",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/flatpickr/dist/flatpickr.js",
|
||||
"{$config.path.node_modules}/flatpickr/dist/l10n/ar.js",
|
||||
],
|
||||
},
|
||||
formvalidation: {
|
||||
styles: [
|
||||
"{$config.path.common_src}/plugins/formvalidation/dist/css/formValidation.css",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/es6-shim/es6-shim.js",
|
||||
"{$config.path.common_src}/plugins/formvalidation/dist/js/FormValidation.full.min.js",
|
||||
"{$config.path.common_src}/plugins/formvalidation/dist/js/plugins/Bootstrap5.min.js"
|
||||
],
|
||||
},
|
||||
bootstrapmaxlength: {
|
||||
"scripts": [
|
||||
"{$config.path.node_modules}/bootstrap-maxlength/src/bootstrap-maxlength.js"
|
||||
]
|
||||
},
|
||||
daterangepicker: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/bootstrap-daterangepicker/daterangepicker.css",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/bootstrap-daterangepicker/daterangepicker.js",
|
||||
],
|
||||
},
|
||||
inputmask: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/inputmask/dist/inputmask.js",
|
||||
"{$config.path.node_modules}/inputmask/dist/bindings/inputmask.binding.js"
|
||||
]
|
||||
},
|
||||
tinyslider: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/tiny-slider/dist/tiny-slider.css",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/tiny-slider/dist/min/tiny-slider.js",
|
||||
],
|
||||
},
|
||||
nouislider: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/nouislider/dist/nouislider.css",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/nouislider/dist/nouislider.js",
|
||||
],
|
||||
},
|
||||
autosize: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/autosize/dist/autosize.js",
|
||||
],
|
||||
},
|
||||
clipboard: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/clipboard/dist/clipboard.min.js",
|
||||
],
|
||||
},
|
||||
bootstrapmultiselectsplitter: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/bootstrap-multiselectsplitter/bootstrap-multiselectsplitter.js",
|
||||
],
|
||||
},
|
||||
smoothscroll: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/smooth-scroll/dist/smooth-scroll.js",
|
||||
],
|
||||
},
|
||||
dropzone: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/dropzone/dist/dropzone.css",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/dropzone/dist/dropzone.js",
|
||||
"{$config.path.common_src}/js/vendors/plugins/dropzone.init.js",
|
||||
],
|
||||
},
|
||||
quil: {
|
||||
styles: ["{$config.path.node_modules}/quill/dist/quill.snow.css"],
|
||||
scripts: ["{$config.path.node_modules}/quill/dist/quill.js"],
|
||||
},
|
||||
tagify: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/@yaireo/tagify/dist/tagify.css",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/@yaireo/tagify/dist/tagify.polyfills.min.js",
|
||||
"{$config.path.node_modules}/@yaireo/tagify/dist/tagify.min.js",
|
||||
],
|
||||
},
|
||||
toastr: {
|
||||
styles: ["{$config.path.common_src}/plugins/toastr/build/toastr.css"],
|
||||
scripts: ["{$config.path.common_src}/plugins/toastr/build/toastr.min.js"],
|
||||
},
|
||||
apexcharts: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/apexcharts/dist/apexcharts.css",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/apexcharts/dist/apexcharts.min.js",
|
||||
],
|
||||
},
|
||||
chartjs: {
|
||||
scripts: ["{$config.path.node_modules}/chart.js/dist/chart.js"],
|
||||
},
|
||||
countupjs: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/countup.js/dist/countUp.umd.js",
|
||||
],
|
||||
},
|
||||
sweetalert2: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/sweetalert2/dist/sweetalert2.css",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/es6-promise-polyfill/promise.min.js",
|
||||
"{$config.path.node_modules}/sweetalert2/dist/sweetalert2.min.js",
|
||||
"{$config.path.common_src}/js/vendors/plugins/sweetalert2.init.js",
|
||||
],
|
||||
},
|
||||
keenicons: {
|
||||
styles: [
|
||||
"{$config.path.common_src}/plugins/keenicons/duotone/style.css",
|
||||
"{$config.path.common_src}/plugins/keenicons/outline/style.css",
|
||||
"{$config.path.common_src}/plugins/keenicons/solid/style.css",
|
||||
],
|
||||
fonts: [
|
||||
"{$config.path.common_src}/plugins/keenicons/duotone/fonts/**",
|
||||
"{$config.path.common_src}/plugins/keenicons/outline/fonts/**",
|
||||
"{$config.path.common_src}/plugins/keenicons/solid/fonts/**",
|
||||
],
|
||||
},
|
||||
"line-awesome": {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/line-awesome/dist/line-awesome/css/line-awesome.css",
|
||||
],
|
||||
fonts: [
|
||||
"{$config.path.node_modules}/line-awesome/dist/line-awesome/fonts/**",
|
||||
],
|
||||
},
|
||||
"bootstrap-icons": {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/bootstrap-icons/font/bootstrap-icons.css",
|
||||
],
|
||||
fonts: [
|
||||
"{$config.path.node_modules}/bootstrap-icons/font/fonts/**",
|
||||
],
|
||||
},
|
||||
"@fortawesome": {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/@fortawesome/fontawesome-free/css/all.min.css",
|
||||
],
|
||||
fonts: [
|
||||
"{$config.path.node_modules}/@fortawesome/fontawesome-free/webfonts/**",
|
||||
],
|
||||
}
|
||||
},
|
||||
override: {
|
||||
styles: ["{$config.path.src}/sass/plugins.scss"],
|
||||
},
|
||||
},
|
||||
dist: {
|
||||
styles: "{$config.dist}/plugins/global/plugins.bundle.css",
|
||||
scripts: "{$config.dist}/plugins/global/plugins.bundle.js",
|
||||
images: "{$config.dist}/plugins/global/images",
|
||||
fonts: "{$config.dist}/plugins/global/fonts",
|
||||
},
|
||||
},
|
||||
custom: {
|
||||
draggable: {
|
||||
src: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/@shopify/draggable/lib/draggable.bundle.js",
|
||||
"{$config.path.node_modules}/@shopify/draggable/lib/draggable.bundle.legacy.js",
|
||||
"{$config.path.node_modules}/@shopify/draggable/lib/draggable.js",
|
||||
"{$config.path.node_modules}/@shopify/draggable/lib/sortable.js",
|
||||
"{$config.path.node_modules}/@shopify/draggable/lib/droppable.js",
|
||||
"{$config.path.node_modules}/@shopify/draggable/lib/swappable.js",
|
||||
"{$config.path.node_modules}/@shopify/draggable/lib/plugins.js",
|
||||
"{$config.path.node_modules}/@shopify/draggable/lib/plugins/collidable.js",
|
||||
"{$config.path.node_modules}/@shopify/draggable/lib/plugins/resize-mirror.js",
|
||||
"{$config.path.node_modules}/@shopify/draggable/lib/plugins/snappable.js",
|
||||
"{$config.path.node_modules}/@shopify/draggable/lib/plugins/swap-animation.js",
|
||||
],
|
||||
},
|
||||
dist: {
|
||||
scripts: "{$config.dist}/plugins/custom/draggable/draggable.bundle.js",
|
||||
},
|
||||
},
|
||||
prismjs: {
|
||||
src: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/prism-themes/themes/prism-shades-of-purple.css",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/prismjs/prism.js",
|
||||
"{$config.path.node_modules}/prismjs/components/prism-markup.js",
|
||||
"{$config.path.node_modules}/prismjs/components/prism-markup-templating.js",
|
||||
"{$config.path.node_modules}/prismjs/components/prism-bash.js",
|
||||
"{$config.path.node_modules}/prismjs/components/prism-javascript.js",
|
||||
"{$config.path.node_modules}/prismjs/components/prism-scss.js",
|
||||
"{$config.path.node_modules}/prismjs/components/prism-css.js",
|
||||
"{$config.path.node_modules}/prismjs/components/prism-php.js",
|
||||
"{$config.path.node_modules}/prismjs/components/prism-php-extras.js",
|
||||
"{$config.path.node_modules}/prismjs/components/prism-python.js",
|
||||
"{$config.path.node_modules}/prismjs/components/prism-aspnet.js",
|
||||
"{$config.path.node_modules}/prismjs/plugins/normalize-whitespace/prism-normalize-whitespace.js",
|
||||
"{$config.path.common_src}/js/vendors/plugins/prism.init.js",
|
||||
],
|
||||
},
|
||||
dist: {
|
||||
styles: "{$config.dist}/plugins/custom/prismjs/prismjs.bundle.css",
|
||||
scripts: "{$config.dist}/plugins/custom/prismjs/prismjs.bundle.js",
|
||||
},
|
||||
},
|
||||
datatables: {
|
||||
src: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/datatables.net-bs5/css/dataTables.bootstrap5.css",
|
||||
"{$config.path.node_modules}/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css",
|
||||
"{$config.path.node_modules}/datatables.net-colreorder-bs5/css/colReorder.bootstrap5.min.css",
|
||||
"{$config.path.node_modules}/datatables.net-fixedcolumns-bs5/css/fixedColumns.bootstrap5.min.css",
|
||||
"{$config.path.node_modules}/datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.min.css",
|
||||
"{$config.path.node_modules}/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css",
|
||||
"{$config.path.node_modules}/datatables.net-rowreorder-bs5/css/rowReorder.bootstrap5.min.css",
|
||||
"{$config.path.node_modules}/datatables.net-scroller-bs5/css/scroller.bootstrap5.min.css",
|
||||
"{$config.path.node_modules}/datatables.net-select-bs5/css/select.bootstrap5.min.css",
|
||||
"{$config.path.node_modules}/datatables.net-datetime/dist/dataTables.dateTime.min.css",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/datatables.net/js/jquery.dataTables.js",
|
||||
"{$config.path.node_modules}/datatables.net-bs5/js/dataTables.bootstrap5.js",
|
||||
"{$config.path.common_src}/js/vendors/plugins/datatables.init.js",
|
||||
"{$config.path.node_modules}/jszip/dist/jszip.min.js",
|
||||
"{$config.path.node_modules}/pdfmake/build/pdfmake.min.js",
|
||||
"{$config.path.node_modules}/pdfmake/build/vfs_fonts.js",
|
||||
"{$config.path.node_modules}/datatables.net-buttons/js/dataTables.buttons.min.js",
|
||||
"{$config.path.node_modules}/datatables.net-buttons-bs5/js/buttons.bootstrap5.min.js",
|
||||
"{$config.path.node_modules}/datatables.net-buttons/js/buttons.colVis.js",
|
||||
"{$config.path.node_modules}/datatables.net-buttons/js/buttons.flash.js",
|
||||
"{$config.path.node_modules}/datatables.net-buttons/js/buttons.html5.js",
|
||||
"{$config.path.node_modules}/datatables.net-buttons/js/buttons.print.js",
|
||||
"{$config.path.node_modules}/datatables.net-colreorder/js/dataTables.colReorder.min.js",
|
||||
"{$config.path.node_modules}/datatables.net-colreorder-bs5/js/colReorder.bootstrap5.js",
|
||||
"{$config.path.node_modules}/datatables.net-fixedcolumns/js/dataTables.fixedColumns.min.js",
|
||||
"{$config.path.node_modules}/datatables.net-fixedcolumns-bs5/js/fixedColumns.bootstrap5.js",
|
||||
"{$config.path.node_modules}/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js",
|
||||
"{$config.path.node_modules}/datatables.net-fixedheader-bs5/js/fixedHeader.bootstrap5.js",
|
||||
"{$config.path.node_modules}/datatables.net-responsive/js/dataTables.responsive.min.js",
|
||||
"{$config.path.node_modules}/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js",
|
||||
"{$config.path.node_modules}/datatables.net-rowgroup/js/dataTables.rowGroup.min.js",
|
||||
"{$config.path.node_modules}/datatables.net-rowgroup-bs5/js/rowGroup.bootstrap5.js",
|
||||
"{$config.path.node_modules}/datatables.net-rowreorder/js/dataTables.rowReorder.min.js",
|
||||
"{$config.path.node_modules}/datatables.net-rowreorder-bs5/js/rowReorder.bootstrap5.js",
|
||||
"{$config.path.node_modules}/datatables.net-scroller/js/dataTables.scroller.min.js",
|
||||
"{$config.path.node_modules}/datatables.net-scroller-bs5/js/dataTables.bootstrap5.js",
|
||||
"{$config.path.node_modules}/datatables.net-select/js/dataTables.select.min.js",
|
||||
"{$config.path.node_modules}/datatables.net-select-bs5/js/dataTables.bootstrap5.js",
|
||||
"{$config.path.node_modules}/datatables.net-datetime/dist/dataTables.dateTime.min.js",
|
||||
"{$config.path.node_modules}/datatables.net-plugins/features/conditionalPaging/dataTables.conditionalPaging.js",
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
styles: "{$config.dist}/plugins/custom/datatables/datatables.bundle.css",
|
||||
scripts: "{$config.dist}/plugins/custom/datatables/datatables.bundle.js",
|
||||
}
|
||||
},
|
||||
leaflet: {
|
||||
src: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/leaflet/dist/leaflet.css",
|
||||
"{$config.path.node_modules}/esri-leaflet-geocoder/dist/esri-leaflet-geocoder.css",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/leaflet/dist/leaflet.js",
|
||||
"{$config.path.node_modules}/esri-leaflet/dist/esri-leaflet.js",
|
||||
"{$config.path.node_modules}/esri-leaflet-geocoder/dist/esri-leaflet-geocoder.js",
|
||||
],
|
||||
},
|
||||
dist: {
|
||||
styles: "{$config.dist}/plugins/custom/leaflet/leaflet.bundle.css",
|
||||
scripts: "{$config.dist}/plugins/custom/leaflet/leaflet.bundle.js",
|
||||
}
|
||||
},
|
||||
fslightbox: {
|
||||
src: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/fslightbox/index.js",
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
scripts: "{$config.dist}/plugins/custom/fslightbox/fslightbox.bundle.js",
|
||||
}
|
||||
},
|
||||
typedjs: {
|
||||
src: {
|
||||
scripts: ["{$config.path.node_modules}/typed.js/lib/typed.js"],
|
||||
},
|
||||
dist: {
|
||||
scripts: "{$config.dist}/plugins/custom/typedjs/typedjs.bundle.js",
|
||||
}
|
||||
},
|
||||
fullcalendar: {
|
||||
src: {
|
||||
styles: ["{$config.path.node_modules}/fullcalendar/main.min.css"],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/fullcalendar/main.js",
|
||||
"{$config.path.node_modules}/fullcalendar/locales-all.min.js",
|
||||
],
|
||||
},
|
||||
dist: {
|
||||
styles: "{$config.dist}/plugins/custom/fullcalendar/fullcalendar.bundle.css",
|
||||
scripts: "{$config.dist}/plugins/custom/fullcalendar/fullcalendar.bundle.js",
|
||||
},
|
||||
},
|
||||
tinymcejs: {
|
||||
src: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/tinymce/tinymce.min.js",
|
||||
"{$config.path.node_modules}/tinymce/themes/silver/theme.js",
|
||||
"{$config.path.node_modules}/tinymce/themes/mobile/theme.js",
|
||||
"{$config.path.node_modules}/tinymce/icons/default/icons.js",
|
||||
"{$config.path.node_modules}/tinymce/plugins/**/plugin.js"
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
scripts: "{$config.dist}/plugins/custom/tinymce/tinymce.bundle.js",
|
||||
}
|
||||
},
|
||||
ckeditorclassic: {
|
||||
src: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/@ckeditor/ckeditor5-build-classic/build/ckeditor.js"
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
scripts: "{$config.dist}/plugins/custom/ckeditor/ckeditor-classic.bundle.js"
|
||||
}
|
||||
},
|
||||
ckeditorinline: {
|
||||
src: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/@ckeditor/ckeditor5-build-inline/build/ckeditor.js"
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
scripts: "{$config.dist}/plugins/custom/ckeditor/ckeditor-inline.bundle.js"
|
||||
}
|
||||
},
|
||||
ckeditorballoon: {
|
||||
src: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/@ckeditor/ckeditor5-build-balloon/build/ckeditor.js"
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
scripts: "{$config.dist}/plugins/custom/ckeditor/ckeditor-balloon.bundle.js"
|
||||
}
|
||||
},
|
||||
ckeditorballoonblock: {
|
||||
src: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/@ckeditor/ckeditor5-build-balloon-block/build/ckeditor.js"
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
scripts: "{$config.dist}/plugins/custom/ckeditor/ckeditor-balloon-block.bundle.js"
|
||||
}
|
||||
},
|
||||
ckeditordecoupleddocument: {
|
||||
src: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/@ckeditor/ckeditor5-build-decoupled-document/build/ckeditor.js"
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
scripts: "{$config.dist}/plugins/custom/ckeditor/ckeditor-document.bundle.js"
|
||||
}
|
||||
},
|
||||
cropperjs: {
|
||||
src: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/cropperjs/dist/cropper.css"
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/cropperjs/dist/cropper.js"
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
styles: "{$config.dist}/plugins/custom/cropper/cropper.bundle.css",
|
||||
scripts: "{$config.dist}/plugins/custom/cropper/cropper.bundle.js"
|
||||
}
|
||||
},
|
||||
jkanban: {
|
||||
src: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/jkanban/dist/jkanban.min.css"
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/jkanban/dist/jkanban.min.js"
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
styles: "{$config.dist}/plugins/custom/jkanban/jkanban.bundle.css",
|
||||
scripts: "{$config.dist}/plugins/custom/jkanban/jkanban.bundle.js"
|
||||
}
|
||||
},
|
||||
flot: {
|
||||
src: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/flot/dist/es5/jquery.flot.js",
|
||||
"{$config.path.node_modules}/flot/source/jquery.flot.resize.js",
|
||||
"{$config.path.node_modules}/flot/source/jquery.flot.categories.js",
|
||||
"{$config.path.node_modules}/flot/source/jquery.flot.pie.js",
|
||||
"{$config.path.node_modules}/flot/source/jquery.flot.stack.js",
|
||||
"{$config.path.node_modules}/flot/source/jquery.flot.crosshair.js",
|
||||
"{$config.path.node_modules}/flot/source/jquery.flot.axislabels.js"
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
scripts: "{$config.dist}/plugins/custom/flotcharts/flotcharts.bundle.js"
|
||||
}
|
||||
},
|
||||
vistimeline: {
|
||||
src: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/vis-timeline/dist/vis-timeline-graph2d.css",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js",
|
||||
"{$config.path.node_modules}/handlebars/dist/handlebars.min.js",
|
||||
],
|
||||
},
|
||||
dist: {
|
||||
styles: "{$config.dist}/plugins/custom/vis-timeline/vis-timeline.bundle.css",
|
||||
scripts: "{$config.dist}/plugins/custom/vis-timeline/vis-timeline.bundle.js"
|
||||
},
|
||||
},
|
||||
jstree: {
|
||||
src: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/jstree/dist/themes/default/style.css"
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/jstree/dist/jstree.js"
|
||||
],
|
||||
images: [
|
||||
"{$config.path.common_src}/media/plugins/jstree/32px.png",
|
||||
"{$config.path.node_modules}/jstree/dist/themes/default/throbber.gif"
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
styles: "{$config.dist}/plugins/custom/jstree/jstree.bundle.css",
|
||||
scripts: "{$config.dist}/plugins/custom/jstree/jstree.bundle.js",
|
||||
images: "{$config.dist}/plugins/custom/jstree/images/jstree"
|
||||
}
|
||||
},
|
||||
formrepeater: {
|
||||
src: {
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/jquery.repeater/src/lib.js",
|
||||
"{$config.path.node_modules}/jquery.repeater/src/jquery.input.js",
|
||||
"{$config.path.node_modules}/jquery.repeater/src/repeater.js"
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
scripts: "{$config.dist}/plugins/custom/formrepeater/formrepeater.bundle.js",
|
||||
}
|
||||
},
|
||||
cookiealert: {
|
||||
src: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/bootstrap-cookie-alert/cookiealert.css"
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.node_modules}/bootstrap-cookie-alert/cookiealert.js"
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
styles: "{$config.dist}/plugins/custom/cookiealert/cookiealert.bundle.css",
|
||||
scripts: "{$config.dist}/plugins/custom/cookiealert/cookiealert.bundle.js",
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
widgets: {
|
||||
src: {
|
||||
scripts: [
|
||||
"{$config.path.common_src}/js/widgets/**/*.js"
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
scripts: "{$config.dist}/js/widgets.bundle.js",
|
||||
}
|
||||
},
|
||||
custom: {
|
||||
src: {
|
||||
styles: [
|
||||
"{$config.path.common_src}/sass/custom/**/*.scss",
|
||||
"{$config.path.src}/sass/custom/**/*.scss",
|
||||
],
|
||||
scripts: [
|
||||
"{$config.path.common_src}/js/custom/**/*.js",
|
||||
"{$config.path.src}/js/custom/**/*.js",
|
||||
],
|
||||
},
|
||||
dist: {
|
||||
styles: "{$config.dist}/css/custom/",
|
||||
scripts: "{$config.dist}/js/custom/",
|
||||
},
|
||||
},
|
||||
media: {
|
||||
src: {
|
||||
media: [
|
||||
"{$config.path.common_src}/media/**/*.*",
|
||||
"{$config.path.src}/media/**/*.*",
|
||||
],
|
||||
},
|
||||
dist: {
|
||||
media: "{$config.dist}/media/",
|
||||
},
|
||||
},
|
||||
misc: {
|
||||
src: {
|
||||
styles: [
|
||||
"{$config.path.node_modules}/tinymce/skins/**/*.css"
|
||||
],
|
||||
media: [
|
||||
"{$config.path.node_modules}/tiny-slider/dist/sourcemaps/tiny-slider.css.map",
|
||||
],
|
||||
},
|
||||
dist: {
|
||||
styles: "{$config.dist}/plugins/custom/tinymce/skins/",
|
||||
media: "{$config.dist}/plugins/global/sourcemaps/",
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export {
|
||||
gulpConfig
|
||||
};
|
10
resources/_keenthemes/tools/gulp/build.js
Normal file
10
resources/_keenthemes/tools/gulp/build.js
Normal file
@ -0,0 +1,10 @@
|
||||
import chalk from 'chalk';
|
||||
import { gulpConfig } from "./../gulp.config.js";
|
||||
|
||||
|
||||
|
||||
let build = Object.assign(gulpConfig, {});
|
||||
console.log(chalk.yellowBright('Using gulp config file: "../../gulp.config.js"'));
|
||||
|
||||
// Exports
|
||||
export { build };
|
23
resources/_keenthemes/tools/gulp/clean.js
Normal file
23
resources/_keenthemes/tools/gulp/clean.js
Normal file
@ -0,0 +1,23 @@
|
||||
import del from "del";
|
||||
import { build } from "./build.js";
|
||||
import { getDemo } from "./helpers.js";
|
||||
|
||||
// task to clean and delete dist directory content
|
||||
const getPaths = () => {
|
||||
const paths = ['!config'];
|
||||
const outputs = build.config.dist;
|
||||
outputs.forEach((output) => {
|
||||
paths.push(output.replace("{demo}", getDemo()));
|
||||
});
|
||||
|
||||
const realpaths = [];
|
||||
paths.forEach((path) => {
|
||||
realpaths.push(path + "/*");
|
||||
});
|
||||
|
||||
return realpaths;
|
||||
};
|
||||
|
||||
export const cleanTask = () => {
|
||||
return del(getPaths(), { force: true });
|
||||
};
|
237
resources/_keenthemes/tools/gulp/compile.js
Normal file
237
resources/_keenthemes/tools/gulp/compile.js
Normal file
@ -0,0 +1,237 @@
|
||||
import gulp from "gulp";
|
||||
import rename from "gulp-rename";
|
||||
import rtlcss from "gulp-rtlcss";
|
||||
import sass from "gulp-dart-sass";
|
||||
import merge from "merge-stream";
|
||||
import _ from "lodash";
|
||||
import {build as buildMaster} from "./build.js";
|
||||
import {argv, getDemo, getTheme, objectWalkRecursive, dotPath, pathOnly, outputFunc, bundle, getFolders} from "./helpers.js";
|
||||
import {cleanTask} from "./clean.js";
|
||||
import fs from "fs";
|
||||
import * as pathDir from 'path';
|
||||
import {fileURLToPath} from 'url';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = pathDir.dirname(__filename);
|
||||
|
||||
// merge with default parameters
|
||||
const args = Object.assign(
|
||||
{
|
||||
prod: false,
|
||||
sourcemap: false,
|
||||
rtl: "",
|
||||
exclude: "",
|
||||
theme: "",
|
||||
path: "",
|
||||
angular: false,
|
||||
react: false,
|
||||
vue: false,
|
||||
suffix: false,
|
||||
},
|
||||
argv
|
||||
);
|
||||
|
||||
var build = buildMaster;
|
||||
const demo = getDemo();
|
||||
|
||||
let theme = '';
|
||||
|
||||
const tasks = [];
|
||||
|
||||
// merge gulp.config.json in release version
|
||||
if (fs.existsSync(`${__dirname}/../gulp.config.json`)) {
|
||||
var c = fs.readFileSync(`${__dirname}/../gulp.config.json`, 'utf8');
|
||||
build = _.merge(build, JSON.parse(c));
|
||||
} else {
|
||||
// set theme
|
||||
theme = getTheme();
|
||||
|
||||
// merge config for theme which have demo levels
|
||||
const themeConfPath = `./../../../../themes/${theme}/html/tools/gulp.config.json`;
|
||||
if (fs.existsSync(`${__dirname}/${themeConfPath}`)) {
|
||||
var c = fs.readFileSync(`${__dirname}/${themeConfPath}`, 'utf8');
|
||||
build = _.merge(build, JSON.parse(c));
|
||||
}
|
||||
|
||||
// merge config for demo levels
|
||||
const demoConfPath = `./../../../../themes/${theme}/html/${demo}/gulp.config.json`;
|
||||
if (fs.existsSync(`${__dirname}/${demoConfPath}`)) {
|
||||
var c = fs.readFileSync(`${__dirname}/${demoConfPath}`, 'utf8');
|
||||
build = _.extend(build, JSON.parse(c));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// docs build option
|
||||
let docsOption = Object.keys(argv).find((value) => {
|
||||
return value.indexOf('docs-') !== -1;
|
||||
});
|
||||
if (typeof docsOption !== 'undefined') {
|
||||
var l = docsOption.split('-');
|
||||
theme = l[1];
|
||||
if (theme === 'asp') {
|
||||
theme += '.net-core'
|
||||
}
|
||||
build.config.path.src = '../../../themes/docs/{theme}/src';
|
||||
build.config.dist = ['../../../themes/docs/{theme}/dist/assets'];
|
||||
}
|
||||
|
||||
|
||||
// set dist to demo folder
|
||||
const dist = [];
|
||||
build.config.dist.forEach((d) => {
|
||||
dist.push(d.replace("{demo}", demo).replace("{theme}", theme));
|
||||
});
|
||||
build.config.dist = dist;
|
||||
|
||||
const path = {};
|
||||
for (let key in build.config.path) {
|
||||
if (!build.config.path.hasOwnProperty(key)) {
|
||||
continue;
|
||||
}
|
||||
path[key] = build.config.path[key]
|
||||
.replace("{demo}", demo)
|
||||
.replace("{theme}", theme);
|
||||
}
|
||||
build.config.path = path;
|
||||
|
||||
if (args.prod !== false) {
|
||||
// force disable debug for production
|
||||
build.config.debug = false;
|
||||
// force assets minification for production
|
||||
build.config.compile.jsMinify = true;
|
||||
build.config.compile.cssMinify = true;
|
||||
}
|
||||
|
||||
if (args.sourcemap !== false) {
|
||||
// force assets sourcemap
|
||||
// build.config.compile.jsSourcemaps = true;
|
||||
// build.config.compile.cssSourcemaps = true;
|
||||
}
|
||||
|
||||
if (args.rtl) {
|
||||
build.config.compile.rtl.enabled = true;
|
||||
}
|
||||
|
||||
const rtlTask = (cb) => {
|
||||
const streams = [];
|
||||
let stream = null;
|
||||
objectWalkRecursive(
|
||||
build.build,
|
||||
(val, key, userdata) => {
|
||||
if (val.hasOwnProperty("src") && val.hasOwnProperty("dist")) {
|
||||
if (["custom", "media", "api", "misc"].indexOf(key) !== -1) {
|
||||
if (userdata.indexOf(key) === -1 && typeof val.styles !== "undefined") {
|
||||
// rtl conversion in each plugins
|
||||
for (let i in val.styles) {
|
||||
if (!val.styles.hasOwnProperty(i)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const toRtlFile = dotPath(val.styles[i]);
|
||||
// exclude scss file for now
|
||||
if (toRtlFile.indexOf(".scss") === -1 && !/\*/.test(toRtlFile)) {
|
||||
stream = gulp.src(toRtlFile, {allowEmpty: true})
|
||||
.pipe(rtlcss())
|
||||
.pipe(rename({suffix: ".rtl"}))
|
||||
.pipe(gulp.dest(pathOnly(toRtlFile)));
|
||||
streams.push(stream);
|
||||
|
||||
// convert rtl for minified
|
||||
if (!/\.min\./i.test(toRtlFile)) {
|
||||
stream = gulp.src(toRtlFile, {allowEmpty: true})
|
||||
.pipe(
|
||||
sass({outputStyle: "compressed"}).on("error", sass.logError)
|
||||
)
|
||||
.pipe(rename({suffix: args.suffix ? ".min.rtl" : ".rtl"}))
|
||||
.pipe(gulp.dest(pathOnly(toRtlFile)));
|
||||
streams.push(stream);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
build.config.compile.rtl.skip
|
||||
);
|
||||
cb();
|
||||
return merge(streams);
|
||||
};
|
||||
|
||||
// task to bundle js/css
|
||||
let buildBundleTask = (cb) => {
|
||||
var streams = [];
|
||||
objectWalkRecursive(build.build, function (val, key) {
|
||||
if (val.hasOwnProperty("src") && val.hasOwnProperty("dist")) {
|
||||
if (["custom", "media", "api", "misc"].indexOf(key) !== -1) {
|
||||
outputFunc(val);
|
||||
} else {
|
||||
streams = bundle(val);
|
||||
}
|
||||
}
|
||||
});
|
||||
cb();
|
||||
return merge(streams);
|
||||
};
|
||||
|
||||
// don't clean assets if compile only 1 type
|
||||
if (!args.sass && !args.js && !args.media) {
|
||||
tasks.push(cleanTask);
|
||||
}
|
||||
|
||||
if (typeof build.config.compile.rtl !== "undefined" && build.config.compile.rtl.enabled) {
|
||||
tasks.push(rtlTask);
|
||||
}
|
||||
tasks.push(buildBundleTask);
|
||||
|
||||
if (args.presets && fs.existsSync(build.config.path.src + '/sass/presets')) {
|
||||
|
||||
const presets = fs.readdirSync(build.config.path.src + '/sass/presets');
|
||||
|
||||
objectWalkRecursive(build.build, function (val, key) {
|
||||
if (val.hasOwnProperty("src") && val.hasOwnProperty("dist")) {
|
||||
if (["custom", "media", "api", "misc"].indexOf(key) !== -1) {
|
||||
} else {
|
||||
// build for presets
|
||||
if (typeof val.src.styles !== 'undefined') {
|
||||
if (val.src.styles[0].indexOf('style.scss') !== -1) {
|
||||
presets.forEach(preset => {
|
||||
let buildStylePresetTask = (cb) => {
|
||||
val.src.styles[0] = '{$config.path.src}/sass/presets/' + preset + '/style.scss';
|
||||
val.dist.styles = '{$config.dist}/css/style.' + preset + '.bundle.css';
|
||||
bundle(val);
|
||||
cb();
|
||||
};
|
||||
tasks.push(buildStylePresetTask);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof val.src.override !== 'undefined' && val.src.override.styles[0].indexOf('plugins.scss') !== -1) {
|
||||
presets.forEach(preset => {
|
||||
let buildPluginPresetTask = (cb) => {
|
||||
val.src.styles.forEach((file, i) => {
|
||||
if (file.indexOf('plugins.scss') !== -1) {
|
||||
val.src.styles[i] = '{$config.path.src}/sass/presets/' + preset + '/plugins.scss';
|
||||
val.dist.styles = '{$config.dist}/plugins/global/plugins.' + preset + '.bundle.css';
|
||||
bundle(val);
|
||||
cb();
|
||||
}
|
||||
});
|
||||
};
|
||||
tasks.push(buildPluginPresetTask);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}, build.build);
|
||||
}
|
||||
|
||||
// entry point
|
||||
const compileTask = gulp.series(...tasks);
|
||||
|
||||
// Exports
|
||||
export {
|
||||
compileTask,
|
||||
};
|
737
resources/_keenthemes/tools/gulp/helpers.js
Normal file
737
resources/_keenthemes/tools/gulp/helpers.js
Normal file
@ -0,0 +1,737 @@
|
||||
import gulp from "gulp";
|
||||
import sass from "gulp-dart-sass";
|
||||
import rename from "gulp-rename";
|
||||
import rewrite from "gulp-rewrite-css";
|
||||
import concat from "gulp-concat";
|
||||
import lazypipe from "lazypipe";
|
||||
import gulpif from "gulp-if";
|
||||
import terser from "gulp-terser";
|
||||
import sourcemaps from "gulp-sourcemaps";
|
||||
import path, * as pathDir from "path";
|
||||
import fs from "fs";
|
||||
import rtlcss from "gulp-rtlcss";
|
||||
import cleancss from "gulp-clean-css";
|
||||
import yargs from "yargs";
|
||||
import {hideBin} from 'yargs/helpers'
|
||||
import glob from "glob";
|
||||
import {fileURLToPath} from 'url';
|
||||
import {build} from "./build.js";
|
||||
|
||||
const argv = yargs(hideBin(process.argv)).argv;
|
||||
|
||||
// merge with default parameters
|
||||
const args = Object.assign(
|
||||
{
|
||||
prod: false,
|
||||
sass: false,
|
||||
js: false,
|
||||
media: false,
|
||||
},
|
||||
argv
|
||||
);
|
||||
|
||||
let allAssets = false;
|
||||
if (args.sass === false && args.js === false && args.media === false) {
|
||||
allAssets = true;
|
||||
}
|
||||
|
||||
// default variable config
|
||||
const config = Object.assign(
|
||||
{},
|
||||
{
|
||||
demo: "",
|
||||
debug: true,
|
||||
compile: {
|
||||
jsMinify: false,
|
||||
cssMinify: false,
|
||||
jsSourcemaps: false,
|
||||
cssSourcemaps: false,
|
||||
},
|
||||
},
|
||||
build.config
|
||||
);
|
||||
|
||||
/**
|
||||
* Walk into object recursively
|
||||
* @param array
|
||||
* @param funcname
|
||||
* @param userdata
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function objectWalkRecursive(array, funcname, userdata) {
|
||||
if (!array || typeof array !== 'object') {
|
||||
return false;
|
||||
}
|
||||
if (typeof funcname !== 'function') {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (let key in array) {
|
||||
// apply "funcname" recursively only on object
|
||||
if (Object.prototype.toString.call(array[key]) === '[object Object]') {
|
||||
const funcArgs = [array[key], funcname];
|
||||
if (arguments.length > 2) {
|
||||
funcArgs.push(userdata);
|
||||
}
|
||||
if (objectWalkRecursive.apply(null, funcArgs) === false) {
|
||||
return false;
|
||||
}
|
||||
// continue
|
||||
}
|
||||
try {
|
||||
if (arguments.length > 2) {
|
||||
funcname(array[key], key, userdata);
|
||||
}
|
||||
else {
|
||||
funcname(array[key], key);
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
console.error('e', e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Add JS compilation options to gulp pipe
|
||||
*/
|
||||
const jsChannel = () => {
|
||||
const { compile } = config;
|
||||
const { jsSourcemaps, jsMinify } = compile;
|
||||
return lazypipe()
|
||||
.pipe(() => {
|
||||
return gulpif(
|
||||
jsSourcemaps,
|
||||
sourcemaps.init({ loadMaps: true, debug: config.debug })
|
||||
);
|
||||
})
|
||||
.pipe(() => {
|
||||
return gulpif(jsMinify, terser());
|
||||
})
|
||||
.pipe(() => {
|
||||
return gulpif(jsSourcemaps, sourcemaps.write("./"));
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Add CSS compilation options to gulp pipe
|
||||
*/
|
||||
const cssChannel = (rtl, includePaths) => {
|
||||
const { compile } = config;
|
||||
const { cssSourcemaps, cssMinify } = compile;
|
||||
return lazypipe()
|
||||
.pipe(() => {
|
||||
return gulpif(
|
||||
cssSourcemaps,
|
||||
sourcemaps.init({ loadMaps: true, debug: config.debug })
|
||||
);
|
||||
})
|
||||
.pipe(() => {
|
||||
return sass({
|
||||
errLogToConsole: true,
|
||||
includePaths: [build.config.path.src + "/sass", "node_modules"].concat(
|
||||
includePaths
|
||||
),
|
||||
// outputStyle: config.cssMinify ? 'compressed' : '',
|
||||
}).on("error", sass.logError);
|
||||
})
|
||||
.pipe(() => {
|
||||
// convert rtl for style.bundle.css only here, others already converted before
|
||||
return gulpif(rtl, rtlcss());
|
||||
})
|
||||
.pipe(() => {
|
||||
return gulpif(cssMinify, cleancss());
|
||||
})
|
||||
.pipe(() => {
|
||||
return gulpif(cssSourcemaps, sourcemaps.write("./"));
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Multiple output paths by output config
|
||||
* @param path
|
||||
* @param outputFile
|
||||
* @param type
|
||||
* @returns {*}
|
||||
*/
|
||||
const outputChannel = (path, outputFile, type) => {
|
||||
if (!allAssets) {
|
||||
if (args.sass && ["styles"].indexOf(type) === -1) {
|
||||
return lazypipe().pipe(() => {
|
||||
// noop
|
||||
});
|
||||
}
|
||||
if (args.js && ["scripts"].indexOf(type) === -1) {
|
||||
return lazypipe().pipe(() => {
|
||||
// noop
|
||||
});
|
||||
}
|
||||
if (args.media && ["media", "fonts", "images"].indexOf(type) === -1) {
|
||||
return lazypipe().pipe(() => {
|
||||
// noop
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof path === "undefined") {
|
||||
console.log("Output path not defined");
|
||||
}
|
||||
if (typeof outputFile === "undefined") {
|
||||
outputFile = "";
|
||||
}
|
||||
|
||||
let piping = lazypipe();
|
||||
|
||||
if (type === "styles") {
|
||||
piping = piping.pipe(() => {
|
||||
return gulpif(
|
||||
build.config.compile.cssMinify,
|
||||
rename({ suffix: args.suffix ? ".min" : "" })
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
if (type === "scripts") {
|
||||
piping = piping.pipe(() => {
|
||||
return gulpif(
|
||||
build.config.compile.jsMinify,
|
||||
rename({ suffix: args.suffix ? ".min" : "" })
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
const regex = new RegExp(/\{\$.*?\}/);
|
||||
const matched = path.match(regex);
|
||||
// {$config.dist}/plugins/global/fonts/fonticon
|
||||
if (matched) {
|
||||
const outputs = build.config.dist;
|
||||
outputs.forEach((output) => {
|
||||
let outputPath = path.replace(matched[0], output).replace(outputFile, "");
|
||||
(function (_output) {
|
||||
piping = piping.pipe(() => {
|
||||
return gulp.dest(_output);
|
||||
});
|
||||
})(outputPath);
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof cb !== 'undefined') {
|
||||
cb();
|
||||
}
|
||||
|
||||
return piping;
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert string path to actual path
|
||||
* @param path
|
||||
* @returns {*}
|
||||
*/
|
||||
const dotPath = (path) => {
|
||||
const regex = new RegExp(/\{\$(.*?)\}/),
|
||||
dot = (obj, i) => {
|
||||
return obj[i];
|
||||
};
|
||||
const matched = path.match(regex);
|
||||
if (matched) {
|
||||
const realpath = matched[1].split(".").reduce(dot, build);
|
||||
return path.replace(matched[0], realpath);
|
||||
}
|
||||
|
||||
return path;
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert multiple paths
|
||||
* @param paths
|
||||
*/
|
||||
const dotPaths = (paths) => {
|
||||
paths.forEach((path, i) => {
|
||||
paths[i] = dotPath(path);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Css path rewriter when bundle files moved
|
||||
* @param bundle
|
||||
*/
|
||||
const cssRewriter = (bundle) => {
|
||||
const imgRegex = new RegExp(/\.(gif|jpg|jpeg|tiff|png|ico|svg)$/i);
|
||||
|
||||
return lazypipe().pipe(() => {
|
||||
// rewrite css relative path
|
||||
return rewrite({
|
||||
destination: bundle["styles"],
|
||||
debug: config.debug,
|
||||
adaptPath: (ctx) => {
|
||||
const isCss = ctx.sourceFile.match(/\.[css]+$/i);
|
||||
// process css only
|
||||
if (isCss[0] === ".css") {
|
||||
if (/plugins.*?bundle/.test(bundle["styles"])) {
|
||||
const pieces = ctx.sourceDir.split(/\\|\//);
|
||||
// only vendors/base pass this
|
||||
let vendor = pieces[pieces.indexOf("node_modules") + 1];
|
||||
if (pieces.indexOf("node_modules") === -1) {
|
||||
vendor = pieces[pieces.indexOf("plugins") + 1];
|
||||
}
|
||||
|
||||
let extension = "fonts/";
|
||||
if (imgRegex.test(ctx.targetFile)) {
|
||||
extension = "images/";
|
||||
}
|
||||
|
||||
return path.join(extension, vendor, path.basename(ctx.targetFile));
|
||||
}
|
||||
|
||||
return ctx.targetFile.replace(/\.?\.\//, "");
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get end filename from path
|
||||
* @param path
|
||||
* @returns {string}
|
||||
*/
|
||||
const baseFileName = (path) => {
|
||||
const maybeFile = path.split("/").pop();
|
||||
if (maybeFile.indexOf(".") !== -1) {
|
||||
return maybeFile;
|
||||
}
|
||||
return "";
|
||||
};
|
||||
|
||||
const baseName = (str, extension) => {
|
||||
let base = new String(str).substring(str.lastIndexOf("/") + 1);
|
||||
if (!extension && base.lastIndexOf(".") != -1) {
|
||||
base = base.substring(0, base.lastIndexOf("."));
|
||||
}
|
||||
return base;
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove file name and get the path
|
||||
*/
|
||||
const pathOnly = (str) => {
|
||||
const array = str.split("/");
|
||||
if (array.length > 0) {
|
||||
array.pop();
|
||||
}
|
||||
|
||||
return array.join("/");
|
||||
};
|
||||
|
||||
const getDemos = () => {
|
||||
if (build.build.demos) {
|
||||
return [];
|
||||
}
|
||||
|
||||
let demos = Object.keys(build.build.demos);
|
||||
// build by demo, leave demo empty to generate all demos
|
||||
if (typeof build.config.demo !== "undefined" && build.config.demo !== "") {
|
||||
demos = build.config.demo.split(",").map((item) => {
|
||||
return item.trim();
|
||||
});
|
||||
}
|
||||
return demos;
|
||||
};
|
||||
|
||||
const getFolders = (dir) => {
|
||||
try {
|
||||
return fs.readdirSync(dir).filter((file) => {
|
||||
return fs.statSync(path.join(dir, file)).isDirectory();
|
||||
});
|
||||
}catch(e) {
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
const getParameters = () => {
|
||||
// remove first 2 unused elements from array
|
||||
let argv = JSON.parse(process.env.npm_config_argv).cooked.slice(2);
|
||||
argv = argv.map((arg) => {
|
||||
return arg.replace(/--/i, "");
|
||||
});
|
||||
return argv;
|
||||
};
|
||||
|
||||
const getDemo = () => {
|
||||
// get demo from parameters
|
||||
let demo = Object.keys(argv)
|
||||
.join(" ")
|
||||
.match(/(demo\d+)/gi) || "";
|
||||
|
||||
if (typeof demo === "object") {
|
||||
demo = demo[0];
|
||||
}
|
||||
|
||||
return demo;
|
||||
};
|
||||
|
||||
const getTheme = () => {
|
||||
// get demo from parameters
|
||||
const theme = Object.keys(argv)[1];
|
||||
const folders = getFolders(build.config.path.src.split("{theme}")[0]);
|
||||
if (folders.indexOf(theme) !== -1) {
|
||||
return theme;
|
||||
}
|
||||
// default theme
|
||||
return "";
|
||||
};
|
||||
|
||||
const bundleStreams = [];
|
||||
|
||||
/**
|
||||
* Bundle
|
||||
* @param bundle
|
||||
*/
|
||||
const bundle = (bundle) => {
|
||||
let stream;
|
||||
|
||||
if (bundle.hasOwnProperty("src") && bundle.hasOwnProperty("dist")) {
|
||||
// for images & fonts as per vendor
|
||||
if ("mandatory" in bundle.src && "optional" in bundle.src) {
|
||||
let vendors = {};
|
||||
|
||||
for (let key in bundle.src) {
|
||||
if (!bundle.src.hasOwnProperty(key)) {
|
||||
continue;
|
||||
}
|
||||
if (key === "override") {
|
||||
continue;
|
||||
}
|
||||
vendors = Object.assign(vendors, bundle.src[key]);
|
||||
}
|
||||
|
||||
for (let vendor in vendors) {
|
||||
if (!vendors.hasOwnProperty(vendor)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const vendorObj = vendors[vendor];
|
||||
|
||||
for (let type in vendorObj) {
|
||||
if (!vendorObj.hasOwnProperty(type)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
dotPaths(vendorObj[type]);
|
||||
|
||||
switch (type) {
|
||||
case "fonts":
|
||||
stream = gulp.src(vendorObj[type], { allowEmpty: true });
|
||||
const outputFonts = outputChannel(bundle.dist[type] + "/" + vendor, undefined, type)();
|
||||
if (outputFonts) {
|
||||
stream.pipe(outputFonts);
|
||||
}
|
||||
bundleStreams.push(stream);
|
||||
break;
|
||||
case "images":
|
||||
stream = gulp.src(vendorObj[type], { allowEmpty: true });
|
||||
const outputImages = outputChannel(bundle.dist[type] + "/" + vendor, undefined, type)();
|
||||
if (outputImages) {
|
||||
stream.pipe(outputImages);
|
||||
}
|
||||
bundleStreams.push(stream);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// flattening array
|
||||
if (!("styles" in bundle.src) && !("scripts" in bundle.src)) {
|
||||
const src = { styles: [], scripts: [] };
|
||||
objectWalkRecursive(bundle.src, (paths, type) => {
|
||||
switch (type) {
|
||||
case "styles":
|
||||
case "scripts":
|
||||
src[type] = src[type].concat(paths);
|
||||
break;
|
||||
case "images":
|
||||
// images for mandatory and optional vendor already processed
|
||||
if (!"mandatory" in bundle.src || !"optional" in bundle.src) {
|
||||
src[type] = src[type].concat(paths);
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
bundle.src = src;
|
||||
}
|
||||
|
||||
for (let type in bundle.src) {
|
||||
if (!bundle.src.hasOwnProperty(type)) {
|
||||
continue;
|
||||
}
|
||||
// skip if not array
|
||||
if (
|
||||
Object.prototype.toString.call(bundle.src[type]) !== "[object Array]"
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
// skip if no bundle output is provided
|
||||
if (typeof bundle.dist[type] === "undefined") {
|
||||
continue;
|
||||
}
|
||||
|
||||
dotPaths(bundle.src[type]);
|
||||
const outputFile = baseFileName(bundle.dist[type]);
|
||||
|
||||
switch (type) {
|
||||
case "styles":
|
||||
if (bundle.dist.hasOwnProperty(type)) {
|
||||
|
||||
// rtl css bundle
|
||||
if (
|
||||
typeof build.config.compile.rtl !== "undefined" &&
|
||||
build.config.compile.rtl.enabled
|
||||
) {
|
||||
let toRtlFiles = [];
|
||||
let rtlFiles = [];
|
||||
bundle.src[type].forEach((path) => {
|
||||
// get rtl css file path
|
||||
let cssFile =
|
||||
pathOnly(path) + "/" + baseName(path) + ".rtl.css";
|
||||
// check if rtl file is exist
|
||||
if (
|
||||
fs.existsSync(cssFile) &&
|
||||
build.config.compile.rtl.skip.indexOf(baseName(path)) === -1
|
||||
) {
|
||||
rtlFiles = rtlFiles.concat(cssFile);
|
||||
} else {
|
||||
// rtl css file not exist, use default css file
|
||||
cssFile = path;
|
||||
}
|
||||
toRtlFiles = toRtlFiles.concat(cssFile);
|
||||
});
|
||||
|
||||
let shouldRtl = false;
|
||||
if (baseName(bundle.dist[type]) === "style.bundle") {
|
||||
shouldRtl = true;
|
||||
}
|
||||
|
||||
const rtlOutput = pathOnly(bundle.dist[type]) + "/" + baseName(bundle.dist[type]) + ".rtl.css";
|
||||
stream = gulp
|
||||
.src(toRtlFiles, { allowEmpty: true })
|
||||
.pipe(cssRewriter(bundle.dist)())
|
||||
.pipe(concat(baseName(bundle.dist[type]) + ".rtl.css"))
|
||||
.pipe(cssChannel(shouldRtl)());
|
||||
const outputRTLCSS = outputChannel(rtlOutput, baseName(bundle.dist[type]) + ".rtl.css", type)();
|
||||
if (outputRTLCSS) {
|
||||
stream.pipe(outputRTLCSS);
|
||||
}
|
||||
bundleStreams.push(stream);
|
||||
}
|
||||
|
||||
// default css bundle
|
||||
stream = gulp
|
||||
.src(bundle.src[type], { allowEmpty: true })
|
||||
.pipe(cssRewriter(bundle.dist)())
|
||||
.pipe(concat(outputFile))
|
||||
.pipe(cssChannel()());
|
||||
const outputDefaultCSSBundle = outputChannel(bundle.dist[type], outputFile, type)();
|
||||
if (outputDefaultCSSBundle) {
|
||||
stream.pipe(outputDefaultCSSBundle);
|
||||
}
|
||||
bundleStreams.push(stream);
|
||||
}
|
||||
break;
|
||||
|
||||
case "scripts":
|
||||
if (bundle.dist.hasOwnProperty(type)) {
|
||||
stream = gulp
|
||||
.src(bundle.src[type], { allowEmpty: true })
|
||||
.pipe(concat(outputFile))
|
||||
.pipe(jsChannel()())
|
||||
.on("error", console.error.bind(console));
|
||||
const outputScripts = outputChannel(bundle.dist[type], outputFile, type)();
|
||||
if (outputScripts) {
|
||||
stream.pipe(outputScripts);
|
||||
}
|
||||
bundleStreams.push(stream);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "fonts":
|
||||
case "images":
|
||||
if (bundle.dist.hasOwnProperty(type)) {
|
||||
stream = gulp.src(bundle.src[type], { allowEmpty: true });
|
||||
const outputImages = outputChannel(bundle.dist[type], undefined, type)();
|
||||
if (outputImages) {
|
||||
stream.pipe(outputImages);
|
||||
}
|
||||
bundleStreams.push(stream);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return bundleStreams;
|
||||
};
|
||||
|
||||
const outputFuncStreams = [];
|
||||
|
||||
/**
|
||||
* Copy source to output destination
|
||||
* @param bundle
|
||||
*/
|
||||
const outputFunc = (bundle) => {
|
||||
let stream;
|
||||
|
||||
if (bundle.hasOwnProperty("src") && bundle.hasOwnProperty("dist")) {
|
||||
for (let type in bundle.src) {
|
||||
if (!bundle.src.hasOwnProperty(type)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
dotPaths(bundle.src[type]);
|
||||
|
||||
if (bundle.dist.hasOwnProperty(type)) {
|
||||
switch (type) {
|
||||
case "styles":
|
||||
// non rtl styles
|
||||
stream = gulp
|
||||
.src(bundle.src[type], { allowEmpty: true })
|
||||
.pipe(cssChannel()());
|
||||
const outputStyles = outputChannel(bundle.dist[type], undefined, type)();
|
||||
if (outputStyles) {
|
||||
stream.pipe(outputStyles);
|
||||
}
|
||||
outputFuncStreams.push(stream);
|
||||
|
||||
// rtl styles for scss
|
||||
let shouldRtl = false;
|
||||
if (
|
||||
typeof build.config.compile.rtl !== "undefined" &&
|
||||
build.config.compile.rtl.enabled
|
||||
) {
|
||||
bundle.src[type].forEach((output) => {
|
||||
if (output.indexOf(".scss") !== -1) {
|
||||
shouldRtl = true;
|
||||
}
|
||||
});
|
||||
stream = gulp
|
||||
.src(bundle.src[type], { allowEmpty: true })
|
||||
.pipe(cssChannel(shouldRtl)())
|
||||
.pipe(rename({ suffix: ".rtl" }));
|
||||
const rtlOutput = outputChannel(bundle.dist[type], undefined, type)();
|
||||
if (rtlOutput) {
|
||||
stream.pipe(rtlOutput);
|
||||
}
|
||||
outputFuncStreams.push(stream);
|
||||
}
|
||||
break;
|
||||
case "scripts":
|
||||
/**
|
||||
* START: bundle by folder
|
||||
*/
|
||||
bundle.src[type].forEach((file) => {
|
||||
const needBundleFileWildLocation = file.replace(
|
||||
"*.js",
|
||||
"bundle/*.js"
|
||||
);
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = pathDir.dirname(__filename);
|
||||
const needBundleFiles = glob.sync(
|
||||
path.resolve(__dirname, "../" + needBundleFileWildLocation)
|
||||
);
|
||||
if (needBundleFiles.length > 0) {
|
||||
const needBundleByGroup = [];
|
||||
needBundleFiles.forEach((js) => {
|
||||
const p = path.dirname(js);
|
||||
if (typeof needBundleByGroup[p] === "undefined") {
|
||||
needBundleByGroup[p] = [];
|
||||
}
|
||||
needBundleByGroup[p].push(js);
|
||||
});
|
||||
|
||||
for (let g in needBundleByGroup) {
|
||||
if (!needBundleByGroup.hasOwnProperty(g)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const files = needBundleByGroup[g];
|
||||
|
||||
// remove ${config.dist}
|
||||
const separatorDir = bundle.dist[type].replace(
|
||||
/{\$config\.dist}/,
|
||||
""
|
||||
);
|
||||
// get sub dir
|
||||
const needBundleDir = files[0].split(separatorDir)[1];
|
||||
const needBundleOutputPath = needBundleDir.replace(
|
||||
/^(.*?)\/(bundle)\/.*?\.(js)$/,
|
||||
"$1.$2.$3"
|
||||
);
|
||||
|
||||
const needBundleStream = gulp
|
||||
.src(files)
|
||||
.pipe(concat(needBundleOutputPath))
|
||||
.pipe(jsChannel()())
|
||||
.on("error", console.error.bind(console));
|
||||
const needBundleOutput = outputChannel(bundle.dist[type], undefined, type)();
|
||||
if (needBundleOutput) {
|
||||
needBundleStream.pipe(needBundleOutput);
|
||||
}
|
||||
outputFuncStreams.push(needBundleStream);
|
||||
|
||||
// exclude bundle folder from next gulp process
|
||||
bundle.src[type].push(
|
||||
"!" +
|
||||
path
|
||||
.dirname(needBundleFileWildLocation)
|
||||
.replace(/\*+?\/bundle/, "") +
|
||||
needBundleDir.replace(/\/bundle.*?$/, "/**")
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
/**
|
||||
* END: bundle by folder
|
||||
*/
|
||||
|
||||
stream = gulp
|
||||
.src(bundle.src[type], { allowEmpty: true })
|
||||
.pipe(jsChannel()())
|
||||
.on("error", console.error.bind(console));
|
||||
const output2 = outputChannel(bundle.dist[type], undefined, type)();
|
||||
if (output2) {
|
||||
stream.pipe(output2);
|
||||
}
|
||||
outputFuncStreams.push(stream);
|
||||
break;
|
||||
default:
|
||||
stream = gulp.src(bundle.src[type], { allowEmpty: true });
|
||||
const outputDefault = outputChannel(bundle.dist[type], undefined, type)();
|
||||
if (outputDefault) {
|
||||
stream.pipe(outputDefault);
|
||||
}
|
||||
outputFuncStreams.push(stream);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return outputFuncStreams;
|
||||
};
|
||||
|
||||
// Exports
|
||||
export {
|
||||
argv,
|
||||
getDemo,
|
||||
getTheme,
|
||||
objectWalkRecursive,
|
||||
dotPath,
|
||||
pathOnly,
|
||||
outputFunc,
|
||||
bundle,
|
||||
getFolders,
|
||||
};
|
47
resources/_keenthemes/tools/gulp/watch.js
Normal file
47
resources/_keenthemes/tools/gulp/watch.js
Normal file
@ -0,0 +1,47 @@
|
||||
import gulp from "gulp";
|
||||
import connect from "gulp-connect";
|
||||
import { build } from "./build.js";
|
||||
import { compileTask } from "./compile.js";
|
||||
import { getDemo } from "./helpers.js";
|
||||
|
||||
// localhost site
|
||||
const localHostTask = (cb) => {
|
||||
connect.server({
|
||||
root: "..",
|
||||
livereload: true,
|
||||
});
|
||||
cb();
|
||||
};
|
||||
|
||||
const reloadTask = (cb) => {
|
||||
connect.reload();
|
||||
cb();
|
||||
};
|
||||
|
||||
const watchTask = () => {
|
||||
return gulp.watch(
|
||||
[build.config.path.src + "/**/*.js", build.config.path.src + "/**/*.scss"],
|
||||
gulp.series(compileTask)
|
||||
);
|
||||
};
|
||||
|
||||
const watchSCSSTask = () => {
|
||||
return gulp.watch(
|
||||
build.config.path.src + "/**/*.scss",
|
||||
gulp.parallel(compileTask)
|
||||
);
|
||||
};
|
||||
|
||||
const watchJSTask = () => {
|
||||
return gulp.watch(
|
||||
build.config.path.src + "/**/*.js",
|
||||
gulp.parallel(compileTask)
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// Exports
|
||||
export {
|
||||
localHostTask,
|
||||
reloadTask, watchTask, watchSCSSTask, watchJSTask
|
||||
};
|
31
resources/_keenthemes/tools/gulpfile.js
Normal file
31
resources/_keenthemes/tools/gulpfile.js
Normal file
@ -0,0 +1,31 @@
|
||||
import { cleanTask } from "./gulp/clean.js";
|
||||
import {
|
||||
localHostTask,
|
||||
reloadTask,
|
||||
watchTask,
|
||||
watchSCSSTask,
|
||||
watchJSTask,
|
||||
} from "./gulp/watch.js";
|
||||
import {
|
||||
// rtlTask,
|
||||
// buildBundleTask,
|
||||
compileTask,
|
||||
} from "./gulp/compile.js";
|
||||
|
||||
// Clean tasks:
|
||||
export { cleanTask as clean };
|
||||
|
||||
// Watch tasks:
|
||||
export { localHostTask as localhost };
|
||||
export { reloadTask as reload };
|
||||
export { watchTask as watch };
|
||||
export { watchSCSSTask as watchSCSS };
|
||||
export { watchJSTask as watchJS };
|
||||
|
||||
// Main tasks:
|
||||
// export { rtlTask as rtl };
|
||||
// export { buildBundleTask as buildBundle };
|
||||
export { compileTask as compile };
|
||||
|
||||
// Entry point:
|
||||
export default compileTask;
|
147
resources/_keenthemes/tools/package.json
Normal file
147
resources/_keenthemes/tools/package.json
Normal file
@ -0,0 +1,147 @@
|
||||
{
|
||||
"name": "keenthemes",
|
||||
"version": "1.0.0",
|
||||
"author": "Keenthemes",
|
||||
"license": "ISC",
|
||||
"homepage": "https://keenthemes.com/",
|
||||
"description": "Packages used by yarn, npm, gulp and webpack",
|
||||
"main": "gulpfile.js",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@ckeditor/ckeditor5-alignment": "^35.2.1",
|
||||
"@ckeditor/ckeditor5-build-balloon": "^35.2.1",
|
||||
"@ckeditor/ckeditor5-build-balloon-block": "^35.2.1",
|
||||
"@ckeditor/ckeditor5-build-classic": "^35.2.1",
|
||||
"@ckeditor/ckeditor5-build-decoupled-document": "^35.2.1",
|
||||
"@ckeditor/ckeditor5-build-inline": "^35.2.1",
|
||||
"@eonasdan/tempus-dominus": "^6.2.10",
|
||||
"@fortawesome/fontawesome-free": "^6.1.1",
|
||||
"@popperjs/core": "2.11.6",
|
||||
"@shopify/draggable": "^1.0.0-beta.12",
|
||||
"@yaireo/tagify": "^4.9.2",
|
||||
"acorn": "^8.0.4",
|
||||
"apexcharts": "3.36.0",
|
||||
"autosize": "^5.0.1",
|
||||
"axios": "^0.21.1",
|
||||
"bootstrap": "5.3.0-alpha1",
|
||||
"bootstrap-cookie-alert": "^1.2.1",
|
||||
"bootstrap-daterangepicker": "^3.1.0",
|
||||
"bootstrap-icons": "^1.10.0",
|
||||
"bootstrap-maxlength": "^1.10.1",
|
||||
"bootstrap-multiselectsplitter": "^1.0.4",
|
||||
"chalk": "^4.1.0",
|
||||
"chart.js": "^3.6.0",
|
||||
"clipboard": "^2.0.8",
|
||||
"countup.js": "^2.0.7",
|
||||
"cropperjs": "^1.5.12",
|
||||
"datatables.net": "^1.12.1",
|
||||
"datatables.net-bs5": "^1.12.1",
|
||||
"datatables.net-buttons": "^2.2.3",
|
||||
"datatables.net-buttons-bs5": "^2.2.3",
|
||||
"datatables.net-colreorder": "^1.5.6",
|
||||
"datatables.net-colreorder-bs5": "^1.5.6",
|
||||
"datatables.net-datetime": "^1.1.2",
|
||||
"datatables.net-fixedcolumns": "^4.1.0",
|
||||
"datatables.net-fixedcolumns-bs5": "^4.1.0",
|
||||
"datatables.net-fixedheader": "^3.2.3",
|
||||
"datatables.net-fixedheader-bs5": "^3.2.3",
|
||||
"datatables.net-plugins": "^1.11.5",
|
||||
"datatables.net-responsive": "^2.3.0",
|
||||
"datatables.net-responsive-bs5": "^2.3.0",
|
||||
"datatables.net-rowgroup": "^1.2.0",
|
||||
"datatables.net-rowgroup-bs5": "^1.2.0",
|
||||
"datatables.net-rowreorder": "^1.2.8",
|
||||
"datatables.net-rowreorder-bs5": "^1.2.8",
|
||||
"datatables.net-scroller": "^2.0.6",
|
||||
"datatables.net-scroller-bs5": "^2.0.6",
|
||||
"datatables.net-select": "^1.4.0",
|
||||
"datatables.net-select-bs5": "^1.4.0",
|
||||
"dropzone": "^5.9.2",
|
||||
"es6-promise": "^4.2.8",
|
||||
"es6-promise-polyfill": "^1.2.0",
|
||||
"es6-shim": "^0.35.5",
|
||||
"esri-leaflet": "^3.0.2",
|
||||
"esri-leaflet-geocoder": "^3.0.0",
|
||||
"flatpickr": "^4.6.9",
|
||||
"flot": "^4.2.2",
|
||||
"fslightbox": "^3.3.0-2",
|
||||
"fullcalendar": "^5.8.0",
|
||||
"handlebars": "^4.7.7",
|
||||
"inputmask": "^5.0.6",
|
||||
"jkanban": "^1.3.1",
|
||||
"jquery": "3.6.0",
|
||||
"jquery.repeater": "^1.2.1",
|
||||
"jstree": "^3.3.11",
|
||||
"jszip": "^3.6.0",
|
||||
"leaflet": "^1.7.1",
|
||||
"line-awesome": "^1.3.0",
|
||||
"lozad": "^1.16.0",
|
||||
"moment": "^2.29.1",
|
||||
"nouislider": "^15.2.0",
|
||||
"npm": "^7.19.1",
|
||||
"pdfmake": "^0.2.0",
|
||||
"prism-themes": "^1.7.0",
|
||||
"prismjs": "^1.24.1",
|
||||
"quill": "^1.3.7",
|
||||
"select2": "^4.1.0-rc.0",
|
||||
"smooth-scroll": "^16.1.3",
|
||||
"sweetalert2": "11.4.8",
|
||||
"tiny-slider": "^2.9.3",
|
||||
"tinymce": "^5.8.2",
|
||||
"toastr": "^2.1.4",
|
||||
"typed.js": "2.0.12",
|
||||
"vis-timeline": "^7.4.9",
|
||||
"wnumb": "^1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.13.14",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.13.8",
|
||||
"@babel/preset-env": "^7.13.12",
|
||||
"@babel/register": "^7.13.14",
|
||||
"copy-webpack-plugin": "^8.1.0",
|
||||
"css-loader": "^5.2.0",
|
||||
"css-minimizer-webpack-plugin": "^1.3.0",
|
||||
"del": "^6.0.0",
|
||||
"extract-loader": "^5.1.0",
|
||||
"file-loader": "^6.2.0",
|
||||
"fs-extra": "^10.0.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-clean-css": "^4.3.0",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-connect": "^5.7.0",
|
||||
"gulp-dart-sass": "^1.0.2",
|
||||
"gulp-if": "^3.0.0",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-rewrite-css": "^1.1.2",
|
||||
"gulp-rtlcss": "^1.4.1",
|
||||
"gulp-sourcemaps": "^3.0.0",
|
||||
"gulp-terser": "^2.0.1",
|
||||
"imports-loader": "^1.2.0",
|
||||
"lazypipe": "^1.0.2",
|
||||
"merge-stream": "^2.0.0",
|
||||
"mini-css-extract-plugin": "^1.3.4",
|
||||
"postcss-loader": "^4.0.4",
|
||||
"pretty": "^2.0.0",
|
||||
"replace-in-file-webpack-plugin": "^1.0.6",
|
||||
"rtlcss-webpack-plugin": "^4.0.6",
|
||||
"sass-loader": "^10.1.0",
|
||||
"script-loader": "^0.7.2",
|
||||
"terser-webpack-plugin": "^5.0.3",
|
||||
"url-loader": "^4.1.1",
|
||||
"webpack": "^5.28.0",
|
||||
"webpack-cli": "^4.6.0",
|
||||
"webpack-dev-server": "^3.11.2",
|
||||
"webpack-exclude-assets-plugin": "^0.1.1",
|
||||
"webpack-merge-and-include-globally": "^2.3.4",
|
||||
"webpack-messages": "^2.0.4",
|
||||
"yargs": "^16.2.0",
|
||||
"yarn-install": "^1.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "webpack",
|
||||
"watch": "webpack --watch",
|
||||
"localhost": "webpack serve",
|
||||
"sync": "node sync.js"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user