UNPKG
git-init
Version:
latest (1.0.0)
1.0.0
git-init
github.com/yoshuawuyts/git-init
yoshuawuyts/git-init
git-init
/
index.js
16 lines
(12 loc)
•
265 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const exec =
require
(
'child_process'
).exec
module
.exports = init // initialize a git repo // (str, fn) -> null
function
init
(path, cb)
{
if
(typeof
path
===
'function'
) { cb =
path
path
=
''
}
path
=
path
||
''
exec(
'git init -q '
+
path
, cb) }