UNPKG
wic-weapp-cli
Version:
latest (0.4.3)
0.4.3
0.4.2
0.4.1
0.4.0
0.1.0
0.0.3
A scaffold uesd to fast develop weapp projects.
github.com/blcher/wic-weapp-cli
blcher/wic-weapp-cli
wic-weapp-cli
/
core
/
helper
/
createDir.js
14 lines
(12 loc)
•
285 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const
fs =
require
(
"fs"
);
const
path =
require
(
"path"
);
const
createDir
= (
pathValue
) => {
if
(fs.
existsSync
(pathValue)) {
return
true
; }
if
(
createDir
(path.
dirname
(pathValue))) { fs.
mkdirSync
(pathValue);
return
true
; } };
module
.
exports
= createDir;