How to use the laravel-mix.scripts function in laravel-mix

To help you get started, we’ve selected a few laravel-mix examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cyklokoalicia / OpenSourceBikeShare / webpack.mix.js View on Github external
mix.copy('bower_components/moment/min/moment-with-locales.js', 'public/js/libs/moment.js');
mix.copy('bower_components/bootstrap-daterangepicker/daterangepicker.css', 'public/css/libs/daterangepicker.css');

// Merge all CSS files in one file.
mix.styles([
    '/libs/bootstrap.css',
    '/libs/admin-lte.css',
    '/libs/admin-lte-skin.css',
    '/libs/font-awesome.css',
    '/libs/i-check.css',
    '/libs/app.css'
], './public/css/min.css', './public/css');


// Merge all JS  files in one file.
mix.scripts([
    '/libs/jquery.js',
    '/libs/bootstrap.js',
    '/libs/admin-lte.js',
    '/libs/i-check.js'
], './public/js/min.js', './public/js');
github nahidulhasan / laravel-gentelella / webpack.mix.js View on Github external
mix.copy([
    'node_modules/gentelella/vendors/bootstrap/dist/fonts',
], 'public/assets/admin/fonts');


// mix.scripts([
//     'node_modules/select2/dist/js/select2.full.js',
//     'resources/assets/admin/js/users/edit.js',
// ], 'public/assets/admin/js/users/edit.js').version();
//
// mix.styles([
//     'node_modules/select2/dist/css/select2.css',
// ], 'public/assets/admin/css/users/edit.css').version();

mix.scripts([
    'node_modules/gentelella/vendors/Flot/jquery.flot.js',
    'node_modules/gentelella/vendors/Flot/jquery.flot.time.js',
    'node_modules/gentelella/vendors/Flot/jquery.flot.pie.js',
    'node_modules/gentelella/vendors/Flot/jquery.flot.stack.js',
    'node_modules/gentelella/vendors/Flot/jquery.flot.resize.js',

    'node_modules/gentelella/vendors/flot.orderbars/js/jquery.flot.orderBars.js',
    'node_modules/gentelella/vendors/DateJS/build/date.js',
    'node_modules/gentelella/vendors/flot.curvedlines/curvedLines.js',
    'node_modules/gentelella/vendors/flot-spline/js/jquery.flot.spline.min.js',

    'node_modules/gentelella/production/js/moment/moment.min.js',
    'node_modules/gentelella/vendors/bootstrap-daterangepicker/daterangepicker.js',
    'node_modules/gentelella/vendors/Chart.js/dist/Chart.js',
    'resources/assets/admin/js/dashboard.js',
], 'public/assets/admin/js/dashboard.js').version();
github sebastienheyd / boilerplate / src / webpack.mix.js View on Github external
mix.copy('node_modules/tinymce/skins', 'public/js/tinymce/skins');
mix.copy('node_modules/tinymce/themes', 'public/js/tinymce/themes');
mix.copy('node_modules/stickytoolbar/dist', 'public/js/tinymce/plugins');

// Boilerplate skin
mix.copy('resources/assets/js/vendor/tinymce/skins/boilerplate/fonts', 'public/js/tinymce/skins/ui/boilerplate/fonts');
mix.sass('resources/assets/js/vendor/tinymce/skins/boilerplate/content.inline.scss', 'public/js/tinymce/skins/ui/boilerplate/content.inline.min.css');
mix.sass('resources/assets/js/vendor/tinymce/skins/boilerplate/content.mobile.scss', 'public/js/tinymce/skins/ui/boilerplate/content.mobile.min.css');
mix.sass('resources/assets/js/vendor/tinymce/skins/boilerplate/content.scss', 'public/js/tinymce/skins/ui/boilerplate/content.min.css');
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();
github nasirkhan / laravel-starter / webpack.mix.js View on Github external
*
 * Frontend
 *
 * -----------------------------------------------------------------------------
 */
// frontend css
mix.styles([
    "public/vendor/now-ui-kit/css/bootstrap.min.css",
    "node_modules/@fortawesome/fontawesome-free/css/all.min.css",
    "public/vendor/iziToast/css/iziToast.min.css",
    "public/vendor/now-ui-kit/css/now-ui-kit.css",
    "resources/css/custom-frontend.css",
], "public/css/frontend.css");

// frontend js
mix.scripts([
   "public/vendor/now-ui-kit/js/core/jquery.min.js",
   "public/vendor/now-ui-kit/js/core/popper.min.js",
   "public/vendor/now-ui-kit/js/core/bootstrap.min.js",
   "public/vendor/iziToast/js/iziToast.min.js",
   "public/vendor/now-ui-kit/js/now-ui-kit.js",
   "resources/js/custom-frontend.js",
], "public/js/frontend.js");

if (mix.inProduction()) {
   mix.version();
}
github agungsugiarto / boilerplate / webpack.mix.js View on Github external
mix.sass('resource/assets/scss/daterangepicker.scss', 'resource/build/plugin/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',
], 'resource/build/plugin/datepicker/datepicker.min.js').version();

// ============== FileInput ==============

mix.sass(
    'node_modules/bootstrap-fileinput/scss/fileinput.scss',
    'resource/build/plugin/fileinput/bootstrap-fileinput.min.css'
).version();

mix.scripts([
    'node_modules/bootstrap-fileinput/js/fileinput.min.js',
], 'resource/build/plugin/fileinput/bootstrap-fileinput.min.js').version();

mix.copy('node_modules/bootstrap-fileinput/js/locales', 'resource/build/plugin/fileinput/locales', false);

// ============== Nestable ==============

mix.styles(
    'node_modules/nestable2/jquery.nestable.css',
    'resource/build/plugin/nestable2/jquery.nestable.min.css'
).version();

mix.scripts([
    'node_modules/nestable2/jquery.nestable.js',
], 'resource/build/plugin/nestable2/jquery.nestable.min.css').version();
github sebastienheyd / boilerplate / src / webpack.mix.js View on Github external
'node_modules/datatables.net-bs4/js/dataTables.bootstrap4.js',
    'node_modules/drmonty-datatables-plugins/dataRender/datetime.js',
    'node_modules/drmonty-datatables-plugins/sorting/datetime-moment.js',
    'resources/assets/js/datatables.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 ==============
github seothemes / genesis-starter-theme / webpack.mix.js View on Github external
/*
 * Versioning and cache busting. Append a unique hash for production assets. If
 * you only want versioned assets in production, do a conditional check for
 * `mix.inProduction()`.
 *
 * @link https://laravel.com/docs/5.6/mix#versioning-and-cache-busting
 */
mix.version();

/*
 * Compile JavaScript.
 *
 * @link https://laravel.com/docs/5.6/mix#working-with-scripts
 */
mix
    .scripts([
        `${devPath}/js/editor.js`
    ], `${devPath}/js/min/editor.js`)
    .scripts([
        `${devPath}/js/hide-show.js`,
        `${devPath}/js/sticky-header.js`,
        `${devPath}/js/smooth-scroll.js`
    ], `${devPath}/js/min/main.js`);

/*
 * Compile CSS. Mix supports Sass, Less, Stylus, and plain CSS, and has functions
 * for each of them.
 *
 * @link https://laravel.com/docs/5.6/mix#working-with-stylesheets
 * @link https://laravel.com/docs/5.6/mix#sass
 * @link https://github.com/sass/node-sass#options
github inex / IXP-Manager / webpack.mix.js View on Github external
let 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 your application, as well as bundling up your JS files.
 |
 */

mix.scripts(
    [
        'node_modules/jquery/dist/jquery.min.js',
        'node_modules/jquery-ui-dist/jquery-ui.min.js',
        'node_modules/select2/dist/js/select2.min.js',
        'node_modules/popper.js/dist/umd/popper.min.js',
        'node_modules/bootstrap/dist/js/bootstrap.min.js',
        'node_modules/bootbox/dist/bootbox.min.js',
        'node_modules/datatables.net/js/jquery.dataTables.min.js',
        'node_modules/datatables.net-bs4/js/dataTables.bootstrap4.min.js',
        'node_modules/datatables.net-responsive/js/dataTables.responsive.min.js',
        'node_modules/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js',

        'node_modules/blueimp-file-upload/js/jquery.fileupload.js',
        'node_modules/jquery-knob/dist/jquery.knob.min.js',
        'node_modules/clipboard/dist/clipboard.min.js',
        'node_modules/moment/moment.js',
github Labs64 / laravel-boilerplate / webpack.mix.js View on Github external
mix.styles([
    'node_modules/bootstrap/dist/css/bootstrap.css',
    'node_modules/gentelella/vendors/animate.css/animate.css',
    'node_modules/gentelella/build/css/custom.css',
    'node_modules/guidechimp/dist/guidechimp.min.css',
    'resources/assets/admin/css/admin.css',
], 'public/assets/admin/css/admin.css').version();


mix.copy([
    'node_modules/gentelella/vendors/bootstrap/dist/fonts',
], 'public/assets/admin/fonts');


mix.scripts([
    'node_modules/select2/dist/js/select2.full.js',
    'resources/assets/admin/js/users/edit.js',
], 'public/assets/admin/js/users/edit.js').version();

mix.styles([
    'node_modules/select2/dist/css/select2.css',
], 'public/assets/admin/css/users/edit.css').version();

mix.scripts([
    'node_modules/gentelella/vendors/Flot/jquery.flot.js',
    'node_modules/gentelella/vendors/Flot/jquery.flot.time.js',
    'node_modules/gentelella/vendors/Flot/jquery.flot.pie.js',
    'node_modules/gentelella/vendors/Flot/jquery.flot.stack.js',
    'node_modules/gentelella/vendors/Flot/jquery.flot.resize.js',

    'node_modules/gentelella/vendors/flot.orderbars/js/jquery.flot.orderBars.js',
github changeweb / Unifiedtransform / webpack.mix.js View on Github external
let mix = require('laravel-mix');

mix.scripts([
    'resources/assets/theme/vendors/js/jquery-2.1.3.min.js',
    'resources/assets/theme/vendors/js/bootstrap-3.3.7.min.js',
    'resources/assets/theme/vendors/js/dataTables-1.10.16.min.js',
    'resources/assets/theme/vendors/js/dataTables-1.10.16.bootstrap.min.js',
    'resources/assets/theme/vendors/js/chosen.jquery.min.js',
    'resources/assets/theme/vendors/js/bootstrap-datepicker.min.js',
], 'public/js/vendors.js')

mix.styles([
    'resources/assets/theme/vendors/css/bootstrap.min.css',
    'resources/assets/theme/vendors/css/dataTables-1.10.16.bootstrap.min.css',
    'resources/assets/theme/vendors/css/chosen.bootstrap.min.css',
    'resources/assets/theme/vendors/css/bootstrap-datepicker.min.css',
    'resources/assets/theme/vendors/css/flatly.bootstrap-3.3.7.min.css',
], 'public/css/vendors.css')