@alumna/reflect

    1.0.5 • Public • Published
    reflect
    Reflect the contents of one directory to another. At the speed of light. :zap:

    Features

    • It does not depend on rsync
    • Asynchronous and super fast with files' stat cache
    • Extremely lightweight with no dependencies – 2.2kB!
    • Fully tested on Linux, Mac and Windows

    Additionally, this module is delivered as:

    Install

    $ npm install @alumna/reflect
    

    Usage

    import reflect from '@alumna/reflect';
     
    let { res, err } = await reflect({
     
        src: 'src/',
        
        dest: 'dest/',
        
        // (OPTIONAL) Default to 'true'
        recursive: true,
        
        // (OPTIONAL) Default to 'true'
        // Delete in dest the non-existent files in src
        delete: true,
        
        // (OPTIONAL)
        // Array with files and folders not to reflect
        exclude: [ "skip-this-file.txt", "skip/this/directory" ]
        
    });
     
    if ( err )
        console.error( err )
     
    else
        console.log( res ) // Directory "src/" reflected to "dest/"

    Install

    npm i @alumna/reflect

    DownloadsWeekly Downloads

    1,554

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    9.51 kB

    Total Files

    7

    Last publish

    Collaborators

    • paulocoghi