How to use the laravel-mix.copyDirectory 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 devcode-it / openstamanager / webpack.mix.js View on Github external
// JS principali
mix.js(
    config.development + '/' + config.paths.js + '/app.js',
    config.production + '/' + config.paths.js + '/app.js'
).js(
    config.development + '/' + config.paths.js + '/base.js',
    config.production + '/' + config.paths.js + '/base.js'
);

// Copia di PDFJS
mix.copyDirectory(
    'node_modules/pdf/web',
    config.production + '/pdfjs/web'
);
mix.copyDirectory(
    'node_modules/pdf/build',
    config.production + '/pdfjs/build'
);

// PHP DebugBar
mix.copyDirectory(
    'vendor/maximebf/debugbar/src/DebugBar/Resources',
    config.production + '/php-debugbar'
);

// CSRF
mix.copy(
    'vendor/owasp/csrf-protector-php/js/csrfprotector.js',
    config.production + '/' + config.paths.js + '/csrf'
);
github devcode-it / openstamanager / webpack.mix.js View on Github external
toastr: ['toastr'],
    numeral: ['numeral'],
});

mix.setPublicPath(config.production);

// CSS di default
mix.sass(
    config.development + '/scss/app.scss',
    config.production + '/' + config.paths.css
).options({
    processCssUrls: false
});

// Copia dei webfont di Font Awesome
mix.copyDirectory(
    'node_modules/@fortawesome/fontawesome-free/webfonts',
    config.production + '/webfonts'
);

// CSS personalizzati
mix.styles([
    config.development + '/' + config.paths.css + '/*.css',
], config.production + '/' + config.paths.css + '/style.css');

// CSS dei temi
mix.styles([
    config.development + '/' + config.paths.css + '/themes/*.css',
], config.production + '/' + config.paths.css + '/themes.css');

// CSS di stampa
mix.styles([
github devcode-it / openstamanager / webpack.mix.js View on Github external
);

// ChartJS
mix.copy(
    'node_modules/chart.js/dist/Chart.min.js',
    config.production + '/' + config.paths.js
);

// Password Strength
mix.combine(
    'node_modules/pwstrength-bootstrap/dist/*.js',
    config.production + '/' + config.paths.js + '/password.js'
);

// Immagini
mix.copyDirectory(
    config.development + '/' + config.paths.images + '/',
    config.production + '/' + config.paths.images
);

// Estrazione liberire esterne
mix.extract([
    'jquery',
    'moment',
    'numeral',
    'parsleyjs',
    'select2',
    'toastr',
    'sweetalert2',
    'datatables.net',
    'datatables.net-scroller',
    'datatables.net-select',
github AsgardCms / Platform / Themes / Adminlte / webpack.mix.js View on Github external
/**
 * Compile js and scss
 */
// mix.js('resources/assets/js/asgardcms.js', 'assets/js/asgardcms.js');
// mix.sass('resources/assets/scss/asgardcms.scss', 'assets/css/asgardcms.css');

/**
 * Copy node module
 */
mix.copyDirectory('node_modules/admin-lte', 'assets/vendor/admin-lte');
// mix.copyDirectory('node_modules/animate.css', 'assets/vendor/animate.css');
// mix.copyDirectory('node_modules/bootstrap', 'assets/vendor/bootstrap');
// mix.copyDirectory('node_modules/clipboard', 'assets/vendor/clipboard');
// mix.copyDirectory('node_modules/datatables.net', 'assets/vendor/datatables.net');
// mix.copyDirectory('node_modules/datatables.net-bs', 'assets/vendor/datatables.net-bs');
mix.copyDirectory('node_modules/font-awesome', 'assets/vendor/font-awesome');
// mix.copyDirectory('node_modules/gridstack', 'assets/vendor/gridstack');
// mix.copyDirectory('node_modules/icheck', 'assets/vendor/iCheck');
// mix.copyDirectory('node_modules/jquery', 'assets/vendor/jquery');
// mix.copyDirectory('node_modules/jquery-ui', 'assets/vendor/jquery-ui');
// mix.copyDirectory('node_modules/lodash', 'assets/vendor/lodash');
// mix.copyDirectory('node_modules/simplemde/src', 'assets/vendor/simplemde/src');

/**
 * Publishing the assets
 */
mix.webpackConfig({
    plugins: [
        new WebpackShellPlugin({ onBuildEnd: [`php ../../artisan stylist:publish ${themeInfo.name}`] }),
    ],
});
github pacoorozco / gamify-laravel / webpack.mix.js View on Github external
/*
 |--------------------------------------------------------------------------
 | 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.copyDirectory('node_modules/admin-lte/dist', 'public/vendor/AdminLTE');
mix.copyDirectory('node_modules/admin-lte/plugins', 'public/vendor/AdminLTE/plugins');
mix.copyDirectory('node_modules/admin-lte/bower_components/bootstrap/dist', 'public/vendor/AdminLTE/bootstrap');
mix.copyDirectory('node_modules/admin-lte/bower_components/jquery/dist', 'public/vendor/AdminLTE/jquery');
mix.copyDirectory('node_modules/admin-lte/bower_components/datatables.net/js', 'public/vendor/AdminLTE/plugins/datatables');
mix.copyDirectory('node_modules/admin-lte/bower_components/datatables.net-bs/js', 'public/vendor/AdminLTE/plugins/datatables');
mix.copyDirectory('node_modules/admin-lte/bower_components/datatables.net-bs/css', 'public/vendor/AdminLTE/plugins/datatables');
mix.copyDirectory('node_modules/admin-lte/bower_components/select2/dist', 'public/vendor/AdminLTE/plugins/select2');
mix.copyDirectory('node_modules/jasny-bootstrap/dist', 'public/vendor/jasny-bootstrap');
mix.copyDirectory('node_modules/jquery-datetimepicker/build', 'public/vendor/jquery-datetimepicker');
github justintadlock / mythic / webpack.mix.export.js View on Github external
folders.forEach( folder => {

	if ( fs.existsSync( folder ) ) {
		mix.copyDirectory( folder, `${exportPath}/${folder}` );
	}
} );
github darryldecode / laravel-starter-kit / 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 the application as well as bundling up all the JS files.
 |
 */

mix.disableSuccessNotifications();

mix.copyDirectory('resources/img', 'public/img')
    .js('resources/js/admin/admin.js', 'public/js')
    .sass('resources/sass/admin.scss', 'public/css')
    .sass('resources/sass/front.scss', 'public/css')
    .extract(['vue','vue-router','moment','axios','lodash','dropzone']);
github hui-ho / WebStack-Laravel / webpack.mix.js View on Github external
| 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.styles([
    'resources/assets/web-stack/css/fonts/linecons/css/linecons.css',
    'resources/assets/web-stack/css/fonts/fontawesome/css/font-awesome.min.css',
    'resources/assets/web-stack/css/bootstrap.css',
    'resources/assets/web-stack/css/xenon-core.css',
    'resources/assets/web-stack/css/xenon-components.css',
    'resources/assets/web-stack/css/xenon-skins.css',
    'resources/assets/web-stack/css/nav.css'
], 'public/css/app.css');

mix.copyDirectory('resources/assets/web-stack/css/fonts/fontawesome/fonts', 'public/fonts');
mix.copyDirectory('resources/assets/web-stack/css/fonts/linecons/font', 'public/font');
mix.copyDirectory('resources/assets/web-stack/images', 'public/img');

mix.scripts([
    'resources/assets/web-stack/js/jquery-1.11.1.min.js',
    'resources/assets/web-stack/js/bootstrap.min.js',
    'resources/assets/web-stack/js/TweenMax.min.js',
    'resources/assets/web-stack/js/resizeable.js',
    'resources/assets/web-stack/js/joinable.js',
    'resources/assets/web-stack/js/xenon-api.js',
    'resources/assets/web-stack/js/xenon-toggles.js',
    'resources/assets/web-stack/js/xenon-custom.js',
], 'public/js/app.js');

mix.version();
github NgeSEC / relawan / webpack.mix.js View on Github external
| 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.js('resources/assets/js/app.js', 'public/js')
   .copyDirectory('resources/assets/map', 'public/map')
   .sass('resources/assets/sass/app.scss', 'public/css')
   .copyDirectory('resources/assets/images', 'public/images');

mix.copyDirectory('resources/assets/adminlte/bower_components/', 'public/adminlte/bower');
mix.copyDirectory('resources/assets/adminlte/plugins/', 'public/adminlte/plugins');
mix.copyDirectory('resources/assets/adminlte/dist/', 'public/adminlte/dist');
github DirectoryLister / DirectoryLister / webpack.mix.js View on Github external
let tailwindcss = require('tailwindcss');

mix.setPublicPath('app/assets');

mix.webpackConfig({
    watchOptions: { ignored: ['node_modules', 'app/vendor'] }
});

mix.sass('app/resources/sass/app.scss', 'app/assets/app.css').options({
    processCssUrls: false,
    postCss: [tailwindcss('tailwind.config.js')]
});

mix.js('app/resources/js/app.js', 'app/assets/app.js');

mix.copyDirectory('app/resources/images', 'app/assets/images');

mix.copy(
    'node_modules/@fortawesome/fontawesome-free/webfonts/fa-{brands,solid}-*',
    'app/assets/webfonts'
);

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