Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
})
mix.setResourceRoot('./')
if (mix.config.hmr) {
// Somehow public/hot isn't being removed by Mix. We'll handle it ourselves.
process.on('SIGINT', () => {
try {
fs.unlinkSync(mix.config.publicPath + '/hot')
} catch (e) {
}
process.exit()
})
} else {
mix.copy('resources/assets/img', 'public/img', false)
.copy('node_modules/font-awesome/fonts', 'public/fonts', false)
}
mix.ts('resources/assets/js/app.ts', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')
.ts('resources/assets/js/remote/app.ts', 'public/js/remote')
.sass('resources/assets/sass/remote.scss', 'public/css')
if (mix.config.production) {
mix.version()
mix.disableNotifications()
}
mix.sass('resources/assets/js/vendor/tinymce/skins/boilerplate/skin.scss', 'public/js/tinymce/skins/ui/boilerplate/skin.min.css');
mix.sass('resources/assets/js/vendor/tinymce/skins/boilerplate/skin.mobile.scss', 'public/js/tinymce/skins/ui/boilerplate/skin.mobile.min.css');
// https://www.tiny.cloud/get-tiny/language-packages/
mix.copy('resources/assets/js/vendor/tinymce/langs', 'public/js/tinymce/langs');
mix.scripts([
'node_modules/tinymce/tinymce.min.js',
'node_modules/tinymce/jquery.tinymce.min.js'
], 'public/js/tinymce/tinymce.min.js').version();
// ============== FullCalendar ==============
mix.copy('node_modules/fullcalendar/main.min.css', 'public/js/fullcalendar/main.min.css').version();
mix.copy('node_modules/fullcalendar/main.min.js', 'public/js/fullcalendar/main.min.js').version();
mix.copy('node_modules/fullcalendar/locales/*', 'public/js/fullcalendar/locales').version();
mix.js('resources/assets/js/vendor/fullcalendar/jquery.fullcalendar.js', 'public/js/fullcalendar/jquery.fullcalendar.min.js').version();
// octicons
mix.sass('node_modules/octicons/build/font/_octicons.scss', 'css/vendor/octicons.css');
// Bootstrap Select
mix.copy('node_modules/bootstrap-select/dist/css/bootstrap-select.min.css', 'www/media/css/vendor/bootstrap-select.css');
mix.copy('node_modules/bootstrap-select/dist/js/bootstrap-select.min.js', 'www/media/js/vendor/bootstrap-select.js');
// jQuery Caret (Caret.js)
mix.copy('node_modules/jquery.caret/dist/jquery.caret.min.js', 'www/media/js/vendor/jquery.caret.js');
// At.js (jquery.atwho)
mix.copy('node_modules/at.js/dist/css/jquery.atwho.min.css', 'www/media/css/vendor/jquery.atwho.css');
mix.copy('node_modules/at.js/dist/js/jquery.atwho.min.js', 'www/media/js/vendor/jquery.atwho.js');
// jQuery Textrange
mix.copy('node_modules/jquery-textrange/jquery-textrange.js', 'www/media/js/vendor/jquery-textrange.js');
// Build site resources
mix.sass('assets/scss/jtracker.scss', 'css/jtracker.css');
mix.sass('assets/scss/jtracker-rtl.scss', 'css/jtracker-rtl.css');
mix.sass('assets/scss/markitup.scss', 'css/markitup/skins/tracker/style.css');
mix.js('assets/js/color-select.js', 'js/color-select.js');
mix.js('assets/js/jtracker.js', 'js/jtracker.js');
mix.js('assets/js/jtracker-tmpl.js', 'js/jtracker-tmpl.js');
mix.js('assets/js/uploader-img.js', 'js/uploader-img.js');
mix.js('assets/js/support/documentation-index.js', 'js/support/documentation-index.js');
mix.js('assets/js/text/article-edit.js', 'js/text/article-edit.js');
mix.js('assets/js/text/articles-index.js', 'js/text/articles-index.js');
// Copy angularjs files to build directory.
mix.copy('public/views/*.html', 'public/build/views/');
// Cache busting for angularjs partials.
var glob = require("glob");
glob.sync('public/views/partials/*.html').forEach(function(src) {
var dest = src.replace('.html', '_' + version + '.html');
var dest = dest.replace('views', 'build/views');
mix.copy(src, dest);
});
// Version CSS files.
mix.copy('public/css/cdash.css', 'public/build/css/cdash_' + version + '.css');
mix.copy('public/css/colorblind.css', 'public/build/css/colorblind_' + version + '.css');
mix.copy('public/css/common.css', 'public/build/css/common.css');
mix.styles([
'node_modules/bootstrap/dist/css/bootstrap.css',
'node_modules/bootstrap-vue/dist/bootstrap-vue.css'
], 'public/build/css/3rdparty.css').version();
// Concatenate and minify 3rd party javascript.
mix.scripts([
'public/js/jquery-1.10.2.js',
'public/js/jquery-ui-1.10.4.min.js',
'public/js/jquery.cookie.js',
'public/js/jquery.flot.min.js',
'public/js/jquery.flot.navigate.min.js',
'public/js/jquery.flot.selection.min.js',
'public/js/jquery.flot.symbol.min.js',
'public/js/jquery.flot.time.min.js',
'public/js/jquery.qtip.min.js',
], 'public/js/datatables/datatables.min.js').version();
mix.copy('node_modules/drmonty-datatables-plugins/i18n', 'public/js/datatables/i18n/', false);
mix.styles(
'node_modules/datatables.net-bs4/css/dataTables.bootstrap4.css',
'public/js/datatables/datatables.min.css'
).version();
// ============== Select2 ==============
mix.scripts([
'node_modules/select2/dist/js/select2.full.min.js'
], 'public/js/select2/select2.full.min.js').version();
mix.copy('node_modules/select2/dist/js/i18n', 'public/js/select2/i18n/', false);
// ============== DatePicker ==============
mix.sass('resources/assets/scss/daterangepicker.scss', 'public/js/datepicker/datepicker.min.css').version();
mix.scripts([
'node_modules/admin-lte/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.js',
'node_modules/admin-lte/plugins/daterangepicker/daterangepicker.js',
], 'public/js/datepicker/datepicker.min.js').version();
// ============== FileInput ==============
mix.sass(
'node_modules/bootstrap-fileinput/scss/fileinput.scss',
'public/js/fileinput/bootstrap-fileinput.min.css'
// jQuery Validation
mix.copy('node_modules/jquery-validation/dist/jquery.validate.min.js', 'www/media/js/vendor/jquery-validation.js');
// markItUp!
mix.copy('node_modules/markItUp!/markitup', 'www/media/markitup');
// twbs-pagination
mix.copy('node_modules/twbs-pagination/jquery.twbsPagination.min.js', 'www/media/js/vendor/twbs-pagination.js');
// Bootstrap Datepicker
mix.copy('node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css', 'www/media/css/vendor/bootstrap-datepicker.css');
mix.copy('node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js', 'www/media/js/vendor/bootstrap-datepicker.js');
mix.copy('node_modules/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-GB.min.js', 'www/media/js/vendor/bootstrap-datepicker/locales/bootstrap-datepicker.en-GB.js');
// d3
mix.copy('node_modules/d3/d3.min.js', 'www/media/js/vendor/d3.js');
// octicons
mix.sass('node_modules/octicons/build/font/_octicons.scss', 'css/vendor/octicons.css');
// Bootstrap Select
mix.copy('node_modules/bootstrap-select/dist/css/bootstrap-select.min.css', 'www/media/css/vendor/bootstrap-select.css');
mix.copy('node_modules/bootstrap-select/dist/js/bootstrap-select.min.js', 'www/media/js/vendor/bootstrap-select.js');
// jQuery Caret (Caret.js)
mix.copy('node_modules/jquery.caret/dist/jquery.caret.min.js', 'www/media/js/vendor/jquery.caret.js');
// At.js (jquery.atwho)
mix.copy('node_modules/at.js/dist/css/jquery.atwho.min.css', 'www/media/css/vendor/jquery.atwho.css');
mix.copy('node_modules/at.js/dist/js/jquery.atwho.min.js', 'www/media/js/vendor/jquery.atwho.js');
// jQuery Textrange
],
'www/media/js/vendor/blueimp-file-upload.js'
);
// Bootstrap Switch
mix.copy('node_modules/bootstrap-switch/dist/css/bootstrap2/bootstrap-switch.min.css', 'www/media/css/vendor/bootstrap-switch.css');
mix.copy('node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js', 'www/media/js/vendor/bootstrap-switch.js');
// jQuery Simple Color
mix.copy('node_modules/jquery-simple-color/jquery.simple-color.min.js', 'www/media/js/vendor/jquery-simple-color.js');
// jQuery Validation
mix.copy('node_modules/jquery-validation/dist/jquery.validate.min.js', 'www/media/js/vendor/jquery-validation.js');
// markItUp!
mix.copy('node_modules/markItUp!/markitup', 'www/media/markitup');
// twbs-pagination
mix.copy('node_modules/twbs-pagination/jquery.twbsPagination.min.js', 'www/media/js/vendor/twbs-pagination.js');
// Bootstrap Datepicker
mix.copy('node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css', 'www/media/css/vendor/bootstrap-datepicker.css');
mix.copy('node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js', 'www/media/js/vendor/bootstrap-datepicker.js');
mix.copy('node_modules/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-GB.min.js', 'www/media/js/vendor/bootstrap-datepicker/locales/bootstrap-datepicker.en-GB.js');
// d3
mix.copy('node_modules/d3/d3.min.js', 'www/media/js/vendor/d3.js');
// octicons
mix.sass('node_modules/octicons/build/font/_octicons.scss', 'css/vendor/octicons.css');
// Bootstrap Select
'node_modules/admin-lte/plugins/daterangepicker/daterangepicker.js',
], 'public/js/datepicker/datepicker.min.js').version();
// ============== FileInput ==============
mix.sass(
'node_modules/bootstrap-fileinput/scss/fileinput.scss',
'public/js/fileinput/bootstrap-fileinput.min.css'
).version();
mix.scripts([
'node_modules/bootstrap-fileinput/js/fileinput.min.js',
], 'public/js/fileinput/bootstrap-fileinput.min.js').version();
mix.copy('node_modules/bootstrap-fileinput/js/locales', 'public/js/fileinput/locales', false);
mix.copy('node_modules/bootstrap-fileinput/themes', 'public/js/fileinput/themes', false);
// ======= Code Mirror
mix.scripts(['node_modules/codemirror/lib/codemirror.js'], 'public/js/codemirror/codemirror.min.js').version();
mix.scripts(['resources/assets/js/vendor/codemirror/jquery.codemirror.js'], 'public/js/codemirror/jquery.codemirror.min.js').version();
mix.copy('node_modules/codemirror/addon', 'public/js/codemirror/addon');
mix.copy('node_modules/codemirror/mode', 'public/js/codemirror/mode');
mix.copy('node_modules/codemirror/theme', 'public/js/codemirror/theme');
mix.sass('resources/assets/js/vendor/codemirror/theme/storm.scss', 'public/js/codemirror/theme/storm.css');
mix.styles('node_modules/codemirror/lib/codemirror.css', 'public/js/codemirror/codemirror.min.css').version();
// ============== TinyMCE ==============
mix.copy('node_modules/tinymce/plugins', 'public/js/tinymce/plugins');
mix.setPublicPath('htdocs');
mix.options({
// Process/optimize relative stylesheet url()'s. Set to false, if you don't want them touched.
processCssUrls: true,
});
mix.setResourceRoot('..');
mix.sass('res/assets/sass/app.scss', 'htdocs/css/app.css');
mix.styles([
'node_modules/font-awesome/css/font-awesome.css',
'node_modules/chosen-js/chosen.css',
'node_modules/dropzone/dist/basic.css',
], 'htdocs/css/components.css');
mix.copy('node_modules/chosen-js/*.png', 'htdocs/css');
mix.copy('node_modules/font-awesome/fonts', 'htdocs/fonts');
mix.js([
'res/assets/scripts/app.js',
], 'htdocs/js/app.js');
mix.sass('res/assets/sass/jquery-ui.scss', 'htdocs/css/jquery-ui.css');
mix.scripts([
// core.js
'node_modules/jquery-ui/ui/version.js',
'node_modules/jquery-ui/ui/keycode.js',
'node_modules/jquery-ui/ui/scroll-parent.js',
'node_modules/jquery-ui/ui/unique-id.js',
'node_modules/jquery-ui/ui/focusable.js',
'node_modules/jquery-ui/ui/tabbable.js',
/**
* Compile CSS
*/
mix.sass('resources/scss/admin.scss', 'public/css', { implementation: require('node-sass') });
mix.sass('resources/scss/public.scss', 'public/css', { implementation: require('node-sass') });
/**
* Compile JS
*/
mix.js('resources/js/admin.js', 'public/js');
mix.js('resources/js/public.js', 'public/js');
/**
* Copy CKEditor main files
*/
mix.copy('node_modules/ckeditor4/ckeditor.js', 'public/components/ckeditor4/ckeditor.js');
mix.copy('node_modules/ckeditor4/contents.css', 'public/components/ckeditor4/contents.css');
/**
* Copy CKEditor lang files
*/
mix.copy('node_modules/ckeditor4/lang/fr.js', 'public/components/ckeditor4/lang/fr.js');
mix.copy('node_modules/ckeditor4/lang/es.js', 'public/components/ckeditor4/lang/es.js');
mix.copy('node_modules/ckeditor4/lang/nl.js', 'public/components/ckeditor4/lang/nl.js');
mix.copy('node_modules/ckeditor4/lang/en.js', 'public/components/ckeditor4/lang/en.js');
/**
* Copy CKEditor plugins files
*/
var plugins = [
'dialog',
'dialogadvtab',