Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Conversation

@skepsys
Copy link

@skepsys skepsys commented Apr 14, 2015

In the original patternlab-php (as for release 0.7.12) /source and /public directories were hard-coded in different places (php, json etc). So the difference here is that the source and the output paths were made configurable via config.ini. By default both paths are the same as in the original version, but you can change them by tweaking core/config/config.ini.default before starting the generator for the first time.

NOTES:

  • paths should be related to the PatterLab root folder (where /config, /core and /extras folders are placed).
  • if a path doesn't exists, all levels will be fully created during the first run
  • since paths are now configurable and created automatically, the original /source and /public folders were removed from the project root
  • both directories could be even outside the PatternLab root folder

For example, these are now quite possible settings in config.ini.default for paths:

sourceDir = "some/long/path/to/source"

publicDir = "../../../path/could/go/even/outside/patterlab/directory"

P.S. Yes, I noticed that in the original dev branch some major changes have been done to make these paths configurable, but the last commits were made about a year ago and this work doesn't seemed to be finished. That's why I decided to implement this functionality in a pretty simple way, without huge refactoring of the code. Hope this will allow the community to use PatternLab in a much more flexible way. And of course many thanks to Dave Olsen and all other contributors for this wonderful tool :))

skepsys added 9 commits April 14, 2015 19:49
…ecursively.

For example, these are now quite possible settings in config.ini for paths:
sourceDir = "some/long/path/to/source"
publicDir = "../../../path/could/go/even/outside/patterlab/directory"

NOTE: paths should be related to PatterLab root folder, where /config, /core and /extras folders are placed.
This is done to show the message just once (when starting watching mode it was shown twice before this fix)
@skepsys
Copy link
Author

skepsys commented Apr 14, 2015

Changes were tested with generator, watcher and autoreload features, but only on windows. I wonder if there are any problems with slashes in paths or something like that on mac or linux, that's why some testing on that plarforms will be highly appreciated :)

@dmolsen
Copy link
Member

dmolsen commented Apr 20, 2015

I'll test this locally later this week. PL2 has this covered but since it's taking me a gajillion years to push it out I'll try to get this merged.

@dmolsen dmolsen self-assigned this Apr 20, 2015
@bramsmulders
Copy link

I took this for a spin on my mac and it works beautifully.

@chicgeek
Copy link

+1

@dmolsen dmolsen closed this Jul 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants