feat: 초기 프로젝트 설정 및 룰.md 파일 추가
This commit is contained in:
20
api.hyungi.net/node_modules/vizion/lib/identify.js
generated
vendored
Normal file
20
api.hyungi.net/node_modules/vizion/lib/identify.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
var fs = require('fs');
|
||||
var eachSeries = require('async/eachSeries');
|
||||
|
||||
module.exports = function(folder, cb) {
|
||||
if (folder[folder.length - 1] !== '/')
|
||||
folder += '/';
|
||||
|
||||
eachSeries(['git', 'hg', 'svn'],
|
||||
function(type, callback) {
|
||||
fs.exists(folder+'.'+type, function(exists) {
|
||||
if (exists)
|
||||
return callback(type);
|
||||
else
|
||||
return callback();
|
||||
});
|
||||
},
|
||||
function(final) {
|
||||
return cb(final ? final : 'No versioning system found', folder);
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user