File system and globbing utilities
$ npm install micro-fs -S
const mfs = require('micro-fs');
mfs.copy('src/**/*.js', 'lib').then(() => {
console.log('copy done.');
});
mfs.move('src/**/*.js', 'lib').then(() => {
console.log('move done.');
});
mfs.delete('dist/**').then(() => {
console.log('delete done.');
});
mfs.zip('src/**/*.js', 'source.zip').then(() => {
console.log('archive done.');
});
mfs.glob('src/**/*.js', options).then(files => {
console.log(files);
/**
* [{ cwd, base, path }]
*/
});
mfs.copy(src, dest, options) => Promise
mfs.move(src, dest, options) => Promise
mfs.zip(src, dest, options) => Promise
mfs.glob(src, options) => Promise
mfs.delete(src, options) => Promise
src
is globs andoptions
are documented in glob-stream.
micro-fs is available under the terms of the MIT License.