Nth Permutation Mathematics

    laravel-mix-copy-watched

    2.3.1 • Public • Published

    Laravel Mix Copy Watched npm version GitHub license

    This extension provides a copy method that can watch for not only changes but also additions and deletions.

    Usage

    First, install the extension.

    npm install laravel-mix-copy-watched --save-dev
    

    Then, require it within your webpack.mix.js file, like so:

    let mix = require('laravel-mix');
    
    require('laravel-mix-copy-watched');
    
    mix
        .js('resources/js/app.js', 'public/js')
        .sass('resources/sass/app.scss', 'public/css')
        .copyWatched('resources/images/app.png', 'public/images');

    And you're done!

    The copyWatched and copyDirectoryWatched methods have the same usage as the copy and copyDirectory methods.

    mix.copyWatched(from, to);
    mix.copyWatched('from/regex/**/*.txt', to);
    mix.copyWatched([path1, path2], to);
    mix.copyDirectoryWatched(fromDir, toDir);

    With the base option, it is possible to keep a hierarchical structure (like Gulp).

    mix.copyWatched(
        'resources/images/**/*.{jpg,jpeg,png,gif}',
        'public/images',
        { base: 'resources/images' }
    );

    With the dot option, it is possible to copy files and directories whose names start with dot.

    mix.copyWatched(
        'resources/images',
        'public/images',
        { dot: true }
    );

    Install

    npm i laravel-mix-copy-watched

    DownloadsWeekly Downloads

    1,492

    Version

    2.3.1

    License

    MIT

    Unpacked Size

    10.1 kB

    Total Files

    5

    Last publish

    Collaborators

    • dsktschy