Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit f557188

Browse files
committed
removing need to move data files
1 parent c51058f commit f557188

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

core/lib/PatternLab/Generator.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -81,25 +81,6 @@ public function generate($enableCSS = false, $moveStatic = true, $noCacheBuster
8181
// render out the patterns and move them to public/patterns
8282
$this->generatePatterns();
8383

84-
// make sure data exists
85-
if (!is_dir(__DIR__.Config::$options["patternPublicDir"]."/data")) {
86-
mkdir(__DIR__.Config::$options["patternPublicDir"]."/data");
87-
}
88-
89-
// iterate over the data files and regenerate the entire site if they've changed
90-
$objects = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(Config::$options["sourceDir"]."/_data/"), \RecursiveIteratorIterator::SELF_FIRST);
91-
92-
// make sure dots are skipped
93-
$objects->setFlags(\FilesystemIterator::SKIP_DOTS);
94-
95-
foreach($objects as $name => $object) {
96-
97-
$fileName = str_replace(Config::$options["sourceDir"]."/_data".DIRECTORY_SEPARATOR,"",$name);
98-
if (($fileName[0] != "_") && $object->isFile()) {
99-
FileUtil::moveStaticFile("_data/".$fileName,"","_data","data");
100-
}
101-
102-
}
10384

10485
// move all of the files unless pattern only is set
10586
if ($moveStatic) {

0 commit comments

Comments
 (0)