Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making source and public folders a setting in config.ini #288

Closed
wants to merge 9 commits into from

Conversation

Projects
None yet
4 participants
@skepsys
Copy link

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 some commits Apr 14, 2015

Make migrator.php able to create unexisting source and output paths r…
…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.
Fix: moving text messages about paths to the initialization script.
This is done to show the message just once (when starting watching mode it was shown twice before this fix)
@skepsys

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Member

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

@dmolsen dmolsen added the enhancement label Apr 20, 2015

@bramsmulders

This comment has been minimized.

Copy link

commented Apr 30, 2015

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

@chicgeek

This comment has been minimized.

Copy link

commented Jun 26, 2015

+1

@dmolsen dmolsen closed this Jul 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.