tree-sync

WebJar for tree-sync

Лицензия

Лицензия

ISC
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

tree-sync
Последняя версия

Последняя версия

1.4.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

tree-sync
WebJar for tree-sync
Ссылка на сайт

Ссылка на сайт

https://www.webjars.org
Система контроля версий

Система контроля версий

https://github.com/stefanpenner/tree-sync

Скачать tree-sync

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/tree-sync/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>tree-sync</artifactId>
    <version>1.4.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/tree-sync/
implementation 'org.webjars.npm:tree-sync:1.4.0'
// https://jarcasting.com/artifacts/org.webjars.npm/tree-sync/
implementation ("org.webjars.npm:tree-sync:1.4.0")
'org.webjars.npm:tree-sync:jar:1.4.0'
<dependency org="org.webjars.npm" name="tree-sync" rev="1.4.0">
  <artifact name="tree-sync" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='tree-sync', version='1.4.0')
)
libraryDependencies += "org.webjars.npm" % "tree-sync" % "1.4.0"
[org.webjars.npm/tree-sync "1.4.0"]

Зависимости

compile (5)

Идентификатор библиотеки Тип Версия
org.webjars.npm : mkdirp jar [0.5.1,0.6)
org.webjars.npm : walk-sync jar [0.3.3,0.4)
org.webjars.npm : fs-tree-diff jar [0.5.6,0.6)
org.webjars.npm : quick-temp jar [0.1.5,0.2)
org.webjars.npm : debug jar [2.2.0,3)

Модули Проекта

Данный проект не имеет модулей.

TreeSync CI

A module for repeated efficient synchronizing two directories.

// input/a/{a.js,b.js}
// output/

const tree = new TreeSync('input', 'output');
tree.sync();
// output is now contains copies of everything that is in input

fs.unlink('/input/a/b.js');

// input / output have diverged

tree.sync();

// difference is calculated and efficient patch to update `output` is created and applied

Under the hood, this library uses walk-sync to traverse files and folders. You may optionally pass in options to selectively include or ignore files and directories. These whitelisted properties (ignore and globs) will be passed to walk-sync.

// Assume the following folder structure...
// input/
//   foo/
//     foo.js
//     bar.js
//   bar/
//     foo-bar.js

const tree = new TreeSync('input', 'output', {
  ignore: ['**/b']
});
tree.sync();

// We now expect output to contain foo/, but not bar/.
// Any changes made to bar/ won't be synced to output, and the contents of bar/ won't be traversed.
// Assume the following folder structure...
// input/
//   foo/
//     foo.js
//     bar.js
//   bar/
//     foo-bar.js

const tree = new TreeSync('input', 'output', {
  globs: ['foo', 'foo/bar.js']
});
tree.sync();

// We now expect output to contain foo/bar.js, but nothing else.
// Be careful when using this property! You'll need to make sure that if you're including a file, it's parent
// path is also included, or you'll get an error when tree-sync tries to copy the file over.

Версии библиотеки

Версия
1.4.0