1.1.10 • Published 4 years ago

slue-fs v1.1.10

Weekly downloads
2
License
ISC
Repository
-
Last release
4 years ago

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

4 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago