7.0.0 • Published 9 months ago
remy v7.0.0
Remy
Remove files with emitter (also in zip
packages).
Global
remy
can be installed globally with
npm i remy -g
And used this way:
Usage: remy [path]
Options:
-h, --help display this help and exit
-v, --version output version information and exit
Local
Remy
can be used localy. It will emit event on every copied file.
Good for making progress bars.
Install
npm i remy --save
How to use?
remy(from, names)
from
- path to directory with files or directories to removenames
-array
of file names (optional)
const remy = require('remy');
const cwd = process.cwd();
const abortOnError = false;
const rm = remy(cwd, ['LICENSE', 'README.md', 'package.json']);
rm.on('file', (name) => {
console.log(name);
});
rm.on('directory', (name) => {
console.log(name);
});
rm.on('progress', (percent) => {
console.log(percent);
if (percent >= 50) {
rm.pause();
rm.continue();
}
});
rm.on('error', (error) => {
rm.continue();
});
rm.on('end', () => {
console.log('Removing ended up');
});
In case of starting example output should be similar to:
33%
67%
100%
Removing ended up
Related
- Copymitter - Copy files with emitter.
- Jaguar - Pack and extract .tar.gz archives with emitter.
- OneZip - Pack and extract zip archives with emitter.
- Tar-to-zip - Convert tar and tar.gz archives to zip.
License
MIT
7.0.0
9 months ago
6.0.1
3 years ago
6.0.0
3 years ago
5.0.1
4 years ago
5.0.0
5 years ago
4.1.0
6 years ago
4.0.3
6 years ago
4.0.2
6 years ago
4.0.1
6 years ago
4.0.0
6 years ago
3.0.2
6 years ago
3.0.1
6 years ago
3.0.0
6 years ago
2.0.2
6 years ago
2.0.1
7 years ago
2.0.0
7 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
9 years ago
1.0.0
9 years ago