1.1.10 • Published 5 years ago
slue-fs v1.1.10
slue-fs
Provide one or a array list of glob, to read and write files by stream.
read
const slueFs = require('slue-fs');
const transformObj = require('slue-stream').transformObj;
const patterns = ['./src/**/*.js'];
slueFs.read(patterns).pipe(transformObj(function(file, env, cb) {
console.log(file);
cb(null, file);
}));
write
const slueFs = require('slue-fs');
const transformObj = require('slue-stream').transformObj;
slueFs.read('./test/a.js').pipe(transformObj(function(obj, env, cb) {
cb(null, obj);
})).pipe(slueFs.write('./test/park'));
watch
const slueFs = require('slue-fs');
let watcher = slueFs.watch(['./src/**/*.js']);
watcher.on('change', function(filePath, stat) {
console.log(filePath);
});
1.1.10
5 years ago
1.1.9
6 years ago
1.1.8
7 years ago
1.1.7
7 years ago
1.1.6
7 years ago
1.1.5
7 years ago
1.1.4
7 years ago
1.1.3
7 years ago
1.1.2
7 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.0.9
7 years ago
1.0.8
7 years ago
1.0.7
7 years ago
1.0.6
7 years ago
1.0.5
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago