mirror of
https://github.com/pattern-lab/patternlab-php.git
synced 2025-01-17 14:18:30 +01:00
removing the "ignore file" config and standardizing on the underscore
This commit is contained in:
parent
934fe6cbf9
commit
f536f1435d
@ -17,7 +17,6 @@ class Builder {
|
||||
protected $pp; // public patterns dir
|
||||
protected $dp; // permissions for the public pattern dirs
|
||||
protected $fp; // permissions for the public pattern files
|
||||
protected $if; // directories/files to be ignored in source/patterns
|
||||
protected $wf; // files to be watched to see if they should be moved
|
||||
protected $mf; // where the files should be moved too
|
||||
protected $websocketAddress; // for populating the websockets template partial
|
||||
@ -49,7 +48,7 @@ class Builder {
|
||||
foreach ($config as $key => $value) {
|
||||
|
||||
// if the variables are array-like make sure the properties are validated/trimmed/lowercased before saving
|
||||
if (($key == "if") || ($key == "wf") || ($key == "mf")) {
|
||||
if (($key == "wf") || ($key == "mf")) {
|
||||
$values = explode(",",$value);
|
||||
array_walk($values,'Builder::trim');
|
||||
$this->$key = $values;
|
||||
@ -242,7 +241,7 @@ class Builder {
|
||||
// add the link names
|
||||
foreach($this->patternPaths as $patternType) {
|
||||
|
||||
foreach($patternPaths as $pattern => $entry) {
|
||||
foreach($patternType as $pattern => $entry) {
|
||||
$patternName = $patternType."-".$pattern;
|
||||
$entry = str_replace("/","-",$entry);
|
||||
$this->d->link->$patternName = "/patterns/".$entry."/".$entry.".html";
|
||||
|
@ -49,7 +49,10 @@ class Watcher extends Builder {
|
||||
|
||||
foreach($entries as $entry) {
|
||||
|
||||
if (!in_array($entry,$this->if)) {
|
||||
$patternParts = explode("/",$this->getEntry($entry,"m"));
|
||||
|
||||
// because we're globbing i need to check again to see if the pattern should be ignored
|
||||
if ($patternParts[2][0] != "_") {
|
||||
|
||||
// figure out how to watch for new directories and new files
|
||||
if (!isset($o->$entry)) {
|
||||
|
@ -11,9 +11,6 @@ pp = "/../../public/patterns/";
|
||||
dp = 0775;
|
||||
fp = 0664;
|
||||
|
||||
// directories/files to ignore when iterating over the patterns directory. separate by commas
|
||||
if = ".,..,.DS_Store,d-wrapper";
|
||||
|
||||
// 'wf' is for files that pattern lab should watch for changes, 'mf' is for
|
||||
// where those files should be moved when they are changed. to add files to the watch simply
|
||||
// separate them with commas
|
||||
|
Loading…
x
Reference in New Issue
Block a user