You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$parts = explode(DIRECTORY_SEPARATOR."vendor".DIRECTORY_SEPARATOR, $styleguideKitPath); // set on another machine's config.yml? try to be smart about it
Console::writeInfo("Please double-check the styleguideKitPath option in <path>./config/config.yml</path>. It should be a path relative to the root of your Pattern Lab project...");
97
+
}
98
+
} else {
99
+
$styleguideKitPathFinal = $styleguideKitPath; // fingers crossed everything is fine
100
+
}
101
+
102
+
return$styleguideKitPathFinal;
103
+
104
+
}
105
+
77
106
/**
78
107
* Adds the config options to a var to be accessed from the rest of the system
79
108
* If it's an old config or no config exists this will update and generate it.
@@ -172,17 +201,39 @@ public static function init($baseDir = "", $verbose = true) {
Console::writeError("please make sure sourceDir is set in <path>./config/config.yml</path> by adding 'sourceDir=some/path'. sorry, stopping pattern lab... :(");
225
+
} elseif (!is_dir(self::$options["sourceDir"])) {
226
+
Console::writeError("hrm... i can't seem to find the directory with your source files. are you sure they're at <path>".Console::getHumanReadablePath(self::$options["sourceDir"])."</path>? you can fix this in <path>./config/config.yml</path> by editing sourceDir. sorry, stopping pattern lab... :(");
227
+
}
228
+
if (!isset(self::$options["publicDir"])) {
229
+
Console::writeError("please make sure publicDir is set in <path>./config/config.yml</path> by adding 'publicDir=some/path'. sorry, stopping pattern lab... :(");
230
+
} elseif (!is_dir(self::$options["publicDir"])) {
231
+
Console::writeError("hrm... i can't seem to find the directory where you want to write your styleguide. are you sure it's at <path>".Console::getHumanReadablePath(self::$options["sourceDir"])."</path>? you can fix this in <path>./config/config.yml</path> by editing publicDir. sorry, stopping pattern lab... :(");
232
+
}
233
+
if (isset(self::$options["styleguideKitPath"]) && !is_dir(self::$options["styleguideKitPath"])) {
234
+
Console::writeError("hrm... i can't seem to find the directory where your styleguide files are located. are you sure it's at <path>".Console::getHumanReadablePath(self::$options["styleguideKitPath"])."</path>? you can fix this in <path>./config/config.yml</path> by editing styleguideKitPath. sorry, stopping pattern lab... :(");
235
+
}
236
+
186
237
187
238
// make sure styleguideExcludes is set to an array even if it's empty
188
239
if (is_string(self::$options["styleGuideExcludes"])) {
0 commit comments