mirror of
https://github.com/pattern-lab/patternlab-php.git
synced 2025-01-17 22:29:12 +01:00
added support for a publicDir and sourceDir config option
This commit is contained in:
parent
cb8ee08945
commit
b5799726fa
@ -43,4 +43,10 @@ styleGuideExcludes = ""
|
||||
cacheBusterOn = "true"
|
||||
|
||||
// the pattern rending engine
|
||||
patternEngine = "mustache"
|
||||
patternEngine = "mustache"
|
||||
|
||||
// the public directory
|
||||
publicDir = "public"
|
||||
|
||||
// the source directory
|
||||
sourceDir = "source"
|
@ -26,6 +26,12 @@ class Builder {
|
||||
exit;
|
||||
}
|
||||
|
||||
// set-up the source & public dirs
|
||||
$this->sp = "/../../../".$config["sourceDir"]."/_patterns".DIRECTORY_SEPARATOR;
|
||||
$this->pp = "/../../../".$config["publicDir"]."/patterns".DIRECTORY_SEPARATOR;
|
||||
$this->sd = __DIR__."/../../../".$config["sourceDir"];
|
||||
$this->pd = __DIR__."/../../../".$config["publicDir"];
|
||||
|
||||
// populate some standard variables out of the config
|
||||
foreach ($config as $key => $value) {
|
||||
|
||||
@ -64,12 +70,6 @@ class Builder {
|
||||
|
||||
}
|
||||
|
||||
// set-up the source & public dirs
|
||||
$this->sp = "/../../../source/_patterns".DIRECTORY_SEPARATOR;
|
||||
$this->pp = "/../../../public/patterns".DIRECTORY_SEPARATOR;
|
||||
$this->sd = __DIR__."/../../../source";
|
||||
$this->pd = __DIR__."/../../../public";
|
||||
|
||||
// provide the default for enable CSS. performance hog so it should be run infrequently
|
||||
$this->enableCSS = false;
|
||||
$this->patternCSS = array();
|
||||
@ -281,8 +281,9 @@ class Builder {
|
||||
protected function generateViewAllPages() {
|
||||
|
||||
// make sure $this->mfs & $this->mv are refreshed on each generation of view all
|
||||
$this->loadMustacheFileSystemLoaderInstance();
|
||||
$this->loadMustacheVanillaInstance();
|
||||
$templateLoader = new TemplateLoader();
|
||||
$this->mfs = $templateLoader->fileSystem();
|
||||
$this->mv = $templateLoader->vanilla();
|
||||
|
||||
// add view all to each list
|
||||
$i = 0; $k = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user