@alumna/reflect

中文文档
1.1.3发布于 2023/12/12MITESM + CJS零依赖近 30 天下载 1910

反映一个目录的内容到另一个目录。 以出光速为相.

中文使用文档
文档目录3 节
  1. 特征
  2. 安装
  3. 使用量
reflect
反映一个目录的内容到另一个目录。 以出光速为相. 赞:

特征

  • 这个 没有 取决于 rsync
  • 与文件同步和超快" stat 缓存
  • 极轻重量 无依赖关系 -2.3克贝!
  • 在 Linux 、 Mac 和 Windows 上全面测试
  • 为支持它的文件系统添加了副本并写入支持(参见 缔约方会议(中文(简体) )

此外,本单元是:

安装

$ npm install @alumna/reflect

使用量

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" ],

    // (OPTIONAL)
    // Seconds of time to sync with (for example, 7200, only sync last 2 hours of changes)
    modified_within: null,

    // (OPTIONAL)
    // Only sync files that are newer in the source (ie, destination files that have been updated won't be overwritten)
    only_newer: false,

    // (OPTIONAL)
    // Disable COPYFILE_FICLONE if supported by file system, see more info:
    // https://nodejs.org/docs/latest-v17.x/api/fs.html#fscopyfilesrc-dest-mode-callback
    file_clone: true,

});

if ( err )
    console.error( err )

else
    console.log( res ) // Directory "src/" reflected to "dest/"

版本与发布记录

@alumna/reflect 共发布 10 个版本,首次发布于 2019/05/02;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.1.3latest2023/12/122 年前
1.1.22023/12/122 年前
1.1.12023/12/122 年前
1.1.02023/12/092 年前
1.0.52020/07/236 年前
1.0.42020/03/176 年前

关于 @alumna/reflect 的常见问题

@alumna/reflect 是什么?

反映一个目录的内容到另一个目录。 以出光速为相.

如何安装 @alumna/reflect?

在项目目录运行 npm install @alumna/reflect,或使用 pnpm add / yarn add / bun add。

@alumna/reflect 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/alumna__reflect 是否存在。

@alumna/reflect 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@alumna/reflect 可以商用吗?

@alumna/reflect 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@alumna/reflect 的下载量有多少?

根据 npm 官方下载统计,@alumna/reflect 在 2026/10/06 – 2026/11/04 这 30 天内被下载 1,910 次,日均约 64 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@alumna/reflect 还在维护吗?

最新版本 1.1.3 发布于 2023/12/12(2 年前);至今共发布 10 个版本,其中过去 12 个月发布了 0 个;首次发布于 2019/05/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。