1 | /**
|
2 | * 判断是否为pug对应的数据文件
|
3 | *
|
4 | * @param {string} filePath 文件路径
|
5 | *
|
6 | * @memberOf Watch
|
7 | */
|
8 | module.exports = (filePath)=>{
|
9 | const {path,getFileInfo} = {
|
10 | path:require('path'),
|
11 | getFileInfo:require('./getFileInfo')
|
12 | };
|
13 |
|
14 | let fileInfo = getFileInfo(filePath),
|
15 | dataDir = path.join(fws.srcPath,'data'+path.sep);
|
16 |
|
17 | return filePath.indexOf(dataDir) === 0 && fileInfo.type === '.js';
|
18 | } |
\ | No newline at end of file |