UNPKG

appcanmas

Version:

11 lines 341 B
// 判断项目是否存在 var path = require('path') function has(workSpace, callback, fileName) { var textfile = require('textfile') textfile.read(path.join(workSpace, fileName?fileName:'mas.js'), 'string', data => { if(typeof callback === 'function') { callback(!!data) } }) } module.exports = has