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

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


mix.scripts([
        'node_modules/jquery/dist/jquery.js',
        'node_modules/inputmask/dist/jquery.inputmask.js',
        'node_modules/popper.js/dist/umd/popper.js',
        'node_modules/mustache/mustache.min.js',
        'node_modules/bootstrap/dist/js/bootstrap.js',
/*
        'node_modules/bootstrap-input-spinner/src/bootstrap-input-spinner.js',
*/

        'node_modules/datatables.net/js/jquery.dataTables.js',
        'node_modules/datatables.net-jqui/js/dataTables.jqueryui.js',
        'node_modules/datatables.net-buttons/js/dataTables.buttons.js',
        'node_modules/jszip/dist/jszip.min.js',
        'node_modules/pdfmake/build/pdfmake.js',
        'node_modules/pdfmake/build/vfs_fonts.js',
        'node_modules/datatables.net-buttons/js/buttons.html5.js',
        'node_modules/datatables.net-buttons/js/buttons.print.js',

        'node_modules/sweetalert2/dist/sweetalert2.all.min.js',
        'node_modules/select2/dist/js/select2.full.js',
        'node_modules/select2/dist/js/i18n/hu.js',
        'node_modules/bootstrap-toaster/js/bootstrap-toaster.min.js',

        'node_modules/jquery-ui-dist/jquery-ui.min.js',
        'node_modules/jquery-ui/ui/i18n/datepicker-hu.js',

        'resources/js/ajaxLink.js',
        'resources/js/ajaxDataForm.js',
        'resources/js/jqueryCustomFunction.js',
        'node_modules/bootstrap-input-spinner/src/bootstrap-input-spinner.js',
    ]
    , 'public/js/customize.js')
    .js('resources/js/app.js', 'public/js/app.js')
    .sourceMaps()
    .sass('resources/sass/app.scss', 'public/css').version()
    .copy(['resources/css/invoice.css'],'public/css')
    .postCss('resources/css/app.css', 'public/css', [
        //
    ]);

//sucessful
mix.js('resources/js/admin/*','public/js/admin.js');
mix.js('resources/js/moduleJs/*','public/js/module.js');
mix.js('resources/js/components/*','public/js/components.js');

/*
    .autoload({
    jquery: ['$', 'window.jQuery']
});
*/


mix.browserSync({
    proxy: 'http://localhost:9000/',
    files: [
        'webpack.mix.js',
        'resources/views/*.blade.php',
        'resources/views/**/*.blade.php',
        'resources/!**'
    ]
});
