Skip to content

Commit e38f48d

Browse files
krnsmartinlindhe
authored andcommitted
Feature/make dirs when dirs in lang (martinlindhe#26)
* make dir of js path when not available * wrap in dirname to get parent directory
1 parent db3f79a commit e38f48d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Generator.php

+5
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ public function generateMultiple($path, $umd = null)
110110
} else {
111111
$jsBody = $this->getUMDModule($jsonLocales);
112112
}
113+
114+
if (!is_dir(dirname($fileToCreate))) {
115+
mkdir(dirname($fileToCreate), 0777, true);
116+
}
117+
113118
file_put_contents($fileToCreate, $jsBody);
114119
}
115120
return $createdFiles;

0 commit comments

Comments
 (0)