const mix = require('laravel-mix');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.setPublicPath('public/assets');
mix.options({processCssUrls: false});

mix.js([
  'resources/assets/js/components/AdminZoznamSekcii/main.js',
], 'public/assets/js/adminZoznamSekciiApp.js')
.version();

mix.js([
  'resources/assets/js/components/VysledokVyhladavania/main.js',
], 'public/assets/js/vyhladavanieApp.js')
.version();

mix.js([
  'resources/assets/js/components/PrehliadacUcebnehoMaterialu/main.js',
], 'public/assets/js/prehliadacUcebnehoMaterialuApp.js')
.version();

mix.copy('resources/assets/images', 'public/assets/images');
mix.copy('node_modules/tinymce/tinymce.min.js', 'public/assets/js/tinymce');
mix.copy('node_modules/tinymce/themes', 'public/assets/js/tinymce/themes');
mix.copy('node_modules/tinymce/plugins', 'public/assets/js/tinymce/plugins');
mix.copy('node_modules/tinymce/skins', 'public/assets/js/tinymce/skins');
mix.copy('node_modules/tinymce/icons', 'public/assets/js/tinymce/icons');
mix.copy('resources/assets/js/tinymce/langs', 'public/assets/js/tinymce/langs');

if (mix.inProduction()) {
  mix.version();
}

/*
 /--------------------------------------------------------------------------
 / BACKEND
 /--------------------------------------------------------------------------
 */
