jeudi 29 avril 2021

I am trying to switching from gulp to webpack

This is my code below can anyone help

var elixir = require('laravel-elixir');

var paths = { 'default': './resources/assets/', 'jquery': './vendor/bower/jquery/', 'bootstrap': './vendor/bower/bootstrap-sass/assets/', 'bootstrapFile': './vendor/bower/bootstrap-fileinput/', 'bootstrapSwitch': './vendor/bower/bootstrap-switch/dist/', 'admin': './vendor/bower/startbootstrap-sb-admin-2-sass/', 'social': './vendor/bower/bootstrap-social/', 'fonts': './vendor/bower/font-awesome/', 'tables': './vendor/bower/datatables/media/', 'tablesPlugins': './vendor/bower/datatables-plugins/', 'tablesResponsive': './vendor/bower/datatables-responsive/', 'metisMenu': './vendor/bower/metisMenu/', 'raphael': './vendor/bower/raphael/', 'morris': './vendor/bower/morrisjs/', 'redactor': './vendor/bower/redactor/', 'select2': './vendor/bower/select2/dist/', 'sortable': './vendor/bower/jquery-sortable/source/', 'validation': './vendor/bower/jquery-validation/dist/', 'waypoints': './vendor/bower/waypoints/lib/', 'scrollTo': './vendor/bower/jquery.scrollTo/', 'usMap': './vendor/bower/us-map/', 'tipso': './vendor/bower/tipso/src/', 'owlCarousel': './vendor/bower/owl.carousel/dist/' };

elixir(function(mix) {

/* Admin */

 mix.sass( "admin/app.scss", 'public/assets/admin/css/', {
   includePaths: [
     paths.bootstrap        + 'stylesheets/',
     paths.bootstrapFile    + 'css/',
     paths.admin            + 'sass/',
     paths.fonts            + 'scss/',
     paths.tables           + 'css/',
     paths.tablesResponsive + 'css/',
     paths.metisMenu        + 'dist/',
     paths.morris,
     paths.social,
     paths.redactor         + 'redactor/',
     paths.select2          + 'css/'
   ]
 })

 .copy( paths.fonts         + 'fonts',           'public/assets/admin/fonts'           )
 .copy( paths.bootstrap     + 'fonts/bootstrap', 'public/assets/admin/fonts/bootstrap' )
 .copy( paths.tables        + 'images',          'public/assets/admin/images'          )
 .copy( paths.bootstrapFile + 'img',             'public/assets/admin/images'          )

 .scripts([
         paths.jquery           + 'jquery.js',
         paths.bootstrap        + 'javascripts/bootstrap.js',
         paths.bootstrapFile    + 'js/fileinput.min.js',
         paths.bootstrapSwitch  + 'js/bootstrap-switch.min.js',
         paths.tables           + 'js/jquery.dataTables.js',
         paths.tablesResponsive + 'js/dataTables.responsive.js',
         paths.metisMenu        + 'dist/metisMenu.js',
         paths.raphael          + 'raphael.js',
         paths.morris           + 'morris.js',
         paths.admin            + 'dist/js/sb-admin-2.js',
         paths.redactor         + 'redactor/redactor.js',
         paths.redactor         + 'redactor/redactor-plugins/counter.js',
         paths.redactor         + 'redactor/redactor-plugins/definedlinks.js',
         paths.redactor         + 'redactor/redactor-plugins/editormode.js',
         paths.redactor         + 'redactor/redactor-plugins/filemanager.js',
         paths.redactor         + 'redactor/redactor-plugins/fontcolor.js',
         paths.redactor         + 'redactor/redactor-plugins/fontfamily.js',
         paths.redactor         + 'redactor/redactor-plugins/fontsize.js',
         paths.redactor         + 'redactor/redactor-plugins/imagemanager.js',
         paths.redactor         + 'redactor/redactor-plugins/limiter.js',
         paths.redactor         + 'redactor/redactor-plugins/table.js',
         paths.redactor         + 'redactor/redactor-plugins/textdirection.js',
         paths.redactor         + 'redactor/redactor-plugins/textexpander.js',
         paths.redactor         + 'redactor/redactor-plugins/video.js',
         paths.select2          + 'js/select2.js',
         paths.sortable         + 'js/jquery-sortable.js',
         paths.default          + 'js/admin/file-input.module.js',
         paths.default          + 'js/admin/postal-target.module.js',
         paths.default          + 'js/admin/spend.module.js',
         paths.default          + 'js/admin/custom.js'
     ],
     'public/assets/admin/js/admin.js',
     './'
 );

/* Front */

mix.sass('front/app.scss', 'public/assets/css/', {
    includePaths: [
        paths.bootstrap        + 'stylesheets/'
    ]
})
.scripts([

        paths.jquery           + 'jquery.js',
        paths.validation       + "jquery.validate.min.js",
        paths.waypoints        + "jquery.waypoints.min.js",
        paths.scrollTo         + "jquery.scrollTo.min.js",
        paths.tipso            + "tipso.js",
        paths.owlCarousel      + "owl.carousel.js",
        paths.default          + 'js/front/validation.module.js',
        paths.default          + "js/front/job-filter.js",
        paths.default          + "js/front/distance-picker.js",
        paths.default          + "js/front/apply-validation.js",
        paths.default          + "js/front/contact-validation.js",
        paths.default          + "js/front/profile-tabs.js",
        paths.default          + "js/front/state-hover.js",
        paths.default          + "js/front/main.js"

    ],
    'public/assets/js/app.js',
    './'
)
.scripts([

        paths.default          + "js/front/vendor/raphael.js",
        paths.default          + "js/front/vendor/jquery.usmap.js",
        paths.default          + "js/front/map.js"
    ],
    'public/assets/js/map.js',
    './'
);
//.version([ 'assets/css/app.css', 'assets/js/app.js' ]);

// iFrame
mix.sass([

        'iframe/truckingTruth.scss'

    ],
    'public/assets/css/truckingTruth.css' )
    .scripts([

            paths.jquery           + 'jquery.js',
            paths.validation       + "jquery.validate.min.js",
            paths.default          + "js/front/apply-validation.js"

        ],
        'public/assets/js/truckingTruth.js',
        './'
    );
    //.version([ 'assets/css/truckingTruth.css' ]);

mix.version([ 'assets/css/app.css', 'assets/js/app.js', 'assets/css/truckingTruth.css', 'assets/js/truckingTruth.js' ])

});



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire