1 | const fs = require('fs');
|
2 | const path = require('path');
|
3 | const walk = require('walk');
|
4 | const config = require('./config');
|
5 |
|
6 | const walker = walk.walk('text');
|
7 | walker.on('file', function (root, fileStats, next) {
|
8 | console.log('sss')
|
9 | const ext = path.extname(fileStats.name);
|
10 | const basename = fileStats.name;
|
11 | console.log(basename);
|
12 | if (ext === '.md') {
|
13 | // fs.readFileSync();
|
14 | console.log(root);
|
15 | }
|
16 |
|
17 | next();
|
18 | });
|
19 |
|
20 |
|
21 | walker.on('end', () => {
|
22 |
|
23 |
|
24 | // console.log(result);
|
25 | }); |
\ | No newline at end of file |