ethanmuller/gulp-init — pull request #4 by ethanmuller (2014-08-10 20:55:44+00:00)
Title: Let's actually figure out pattern lab

you guys i think i actually figured out pattern lab

Here's a description of what I had to do to Pattern Lab, for future me's reference when this inevitably breaks in the future:

In `core/lib/PatternLab/Builder.php`, around line 65, you should find a chunk that looks like this:

```
// 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";
```

**sp**: source patterns
**pp**: public patterns
**sd**: source directory
**pd**: public directory

So if pattern lab is living in `lib/pattern-lab`, and you want it to compile to `build`, you'll have to go up two directories.

```
// set-up the source & public dirs
$this->sp = "/../../../source/_patterns".DIRECTORY_SEPARATOR;
$this->pp = "/../../../../../build/patterns".DIRECTORY_SEPARATOR;
$this->sd = __DIR__."/../../../source";
$this->pd = __DIR__."/../../../../../build";
```

And then if you want your source data and patterns to live in `src/pattern-lab/_data` and `src/pattern-lab/_patterns`, change it to this:

```
// set-up the source & public dirs
$this->sp = "/../../../../../src/pattern-lab/_patterns".DIRECTORY_SEPARATOR;
$this->pp = "/../../../../../build/patterns".DIRECTORY_SEPARATOR;
$this->sd = __DIR__."/../../../../../src/pattern-lab";
$this->pd = __DIR__."/../../../../../build";
```

**Also,** make sure you go into `core/migration` and edit all files with a `destinationPath` so that it jives with your new destination.

**And then** make sure you check in `config.ini`, or else it won't work for other people who pull down your project.