PHPackages                             carrooi/cloner - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. carrooi/cloner

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

carrooi/cloner
==============

Copy files or directories from neon configuration

1.0.1(11y ago)025MITPHP

Since Jan 25Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Carrooi/Nette-Cloner)[ Packagist](https://packagist.org/packages/carrooi/cloner)[ RSS](/packages/carrooi-cloner/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (10)Versions (3)Used By (0)

Carrooi/Cloner
==============

[](#carrooicloner)

[![Build Status](https://camo.githubusercontent.com/59725c6efc9ab6eb911c8bbe327cfa9bf8aefeed80fd67d47a87a3899662b413/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f436172726f6f692f4e657474652d436c6f6e65722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Carrooi/Nette-Helpers)[![Donate](https://camo.githubusercontent.com/7f8b0c0980ad316210d1ec0c7d3298ace87d2f7c0eb6911977c0644951af5bd2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f6e6174652d50617950616c2d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=875QBGRGZUK8A)

Extension for auto-copying assets or any other files to your project.

Installation
------------

[](#installation)

```
$ composer require carrooi/cloner
$ composer update

```

Then just enable nette extension in your config.neon:

```
extensions:
	cloner: Carrooi\Cloner\DI\ClonerExtension
```

Configuration
-------------

[](#configuration)

```
extensions:
	cloner: Carrooi\Cloner\DI\ClonerExtension

cloner:

	paths:
		- [%appDir%/../www/node_modules/test/lib, %appDir%/../www/js]
		- [%appDir%/../www/node_modules/jquery/jquery.js, %appDir%/../www/js/jquery.js]
```

There you can see simple configuration which will copy everything from `node_modules/test/lib` directory to our `js` directory also with `jquery.js` file.

Each "source" / "target" path must be in one array (not in pair), but there can be many sources / one target paths.

Take a look at testing [configuration](https://github.com/Carrooi/Nette-Cloner/blob/master/tests/CarrooiTests/Cloner/config/cloner.neon) for all possible path options.

Running
-------

[](#running)

This extension don't do anything by default, so you have to enable it.

```
cloner:

	autoRun: true
```

Also you have to be in `debug` mode, or set `debug` options to `true`.

Now at every request all configured paths will be checked and files updated.

Update command
--------------

[](#update-command)

It is not the best idea to check all files at each request so there is terminal command for that.

```
$ php www/index.php cloner:run --force

```

If you remove `--force` option, Cloner will just print found different files which needs to be updated.

You can also register this command as post install/update script in your composer.json. Then it will be started automatically by composer after each update or install. See more at composer [documentation](https://getcomposer.org/doc/articles/scripts.md).

Changelog
---------

[](#changelog)

- 1.0.0

    - First version
- 1.0.1

    - Checking for changes with filemtime, not hash\_file

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

4123d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/838c6933d498fdb2a31f251ed45006a6ef97935ea2a27f38dab7738038939fc9?d=identicon)[david\_kudera](/maintainers/david_kudera)

---

Top Contributors

[![davidkudera](https://avatars.githubusercontent.com/u/1174072?v=4)](https://github.com/davidkudera "davidkudera (2 commits)")

---

Tags

clonecopyfilesassetscarrooi

### Embed Badge

![Health badge](/badges/carrooi-cloner/health.svg)

```
[![Health](https://phpackages.com/badges/carrooi-cloner/health.svg)](https://phpackages.com/packages/carrooi-cloner)
```

###  Alternatives

[myclabs/deep-copy

Create deep copies (clones) of your objects

8.9k849.8M169](/packages/myclabs-deep-copy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
