Skip to content

Commit 510be37

Browse files
committed
throwing an error if public/index.html is missing
1 parent 9f185a3 commit 510be37

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/PatternLab/Builder.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ protected function generateAnnotations() {
111111
*/
112112
protected function generateIndex() {
113113

114+
// bomb if missing index.html
115+
if (!file_exists(Config::getOption("publicDir")."/index.html")) {
116+
$index = Console::getHumanReadablePath(Config::getOption("publicDir")).DIRECTORY_SEPARATOR."index.html";
117+
Console::writeError("<path>".$index."</path> is missing. grab a copy from your StyleguideKit...");
118+
}
119+
114120
// set-up the dispatcher
115121
$dispatcherInstance = Dispatcher::getInstance();
116122

0 commit comments

Comments
 (0)