{"action":"created","issue":{"url":"https://api.github.com/repos/pattern-lab/edition-php-twig-standard/issues/8","repository_url":"https://api.github.com/repos/pattern-lab/edition-php-twig-standard","labels_url":"https://api.github.com/repos/pattern-lab/edition-php-twig-standard/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/pattern-lab/edition-php-twig-standard/issues/8/comments","events_url":"https://api.github.com/repos/pattern-lab/edition-php-twig-standard/issues/8/events","html_url":"https://github.com/pattern-lab/edition-php-twig-standard/issues/8","id":92543294,"number":8,"title":"Installation within an existing project?","user":{"login":"cviebrock","id":166810,"avatar_url":"https://avatars.githubusercontent.com/u/166810?v=3","gravatar_id":"","url":"https://api.github.com/users/cviebrock","html_url":"https://github.com/cviebrock","followers_url":"https://api.github.com/users/cviebrock/followers","following_url":"https://api.github.com/users/cviebrock/following{/other_user}","gists_url":"https://api.github.com/users/cviebrock/gists{/gist_id}","starred_url":"https://api.github.com/users/cviebrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cviebrock/subscriptions","organizations_url":"https://api.github.com/users/cviebrock/orgs","repos_url":"https://api.github.com/users/cviebrock/repos","events_url":"https://api.github.com/users/cviebrock/events{/privacy}","received_events_url":"https://api.github.com/users/cviebrock/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-07-02T04:13:17Z","updated_at":"2016-06-03T14:35:46Z","closed_at":"2016-04-06T20:23:30Z","body":"I have an existing project (Laravel-based, if you're curious), and we use Twig templates for our output.\r\n\r\nI was hoping to incorporate a styleguide system within my project, with the goal being that my SCSS/CSS and templates exist only in one place and are used for the live site and for the styleguide.\r\n\r\nMy first step was to run `composer require --dev pattern-lab/edition-twig-standard` in my project (which actually required a bit of jiggling to keep dependencies in check).  Then I thought I could run `php vendor/pattern-lab/edition-twig-standard/core/console ...` to get things going, but all I get is:\r\n\r\n```\r\nit doesn't appear that pattern lab has been set-up yet...\r\nplease install pattern lab's dependencies by typing: php core/bin/composer.phar install...\r\n```\r\n\r\nThe problem is that `console` is explictly expecting the _vendor_ directory to be within the package, not the other way around:\r\n\r\n```php\r\n// set-up the project base directory\r\n$baseDir = __DIR__.\"/../\";\r\n\r\n// auto-load classes\r\nif (file_exists($baseDir.\"vendor/autoload.php\")) {\r\n\trequire($baseDir.\"vendor/autoload.php\");\r\n} else {\r\n\tprint \"it doesn't appear that pattern lab has been set-up yet...\\n\";\r\n\tprint \"please install pattern lab's dependencies by typing: php core/bin/composer.phar install...\\n\";\r\n\texit;\r\n}\r\n```\r\n\r\nI'm sure there is another way to check that dependencies are installed (or simply remove this check, since things will fail anyway which should be indication that the user missed something).\r\n\r\nBut I'm also wondering whether other things (e.g. configuration) would work in a setup where Patternlab is a required package instead of an app in and of itself.  Has anyone else done something like this?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/pattern-lab/edition-php-twig-standard/issues/comments/223596011","html_url":"https://github.com/pattern-lab/edition-php-twig-standard/issues/8#issuecomment-223596011","issue_url":"https://api.github.com/repos/pattern-lab/edition-php-twig-standard/issues/8","id":223596011,"user":{"login":"daspete","id":3796340,"avatar_url":"https://avatars.githubusercontent.com/u/3796340?v=3","gravatar_id":"","url":"https://api.github.com/users/daspete","html_url":"https://github.com/daspete","followers_url":"https://api.github.com/users/daspete/followers","following_url":"https://api.github.com/users/daspete/following{/other_user}","gists_url":"https://api.github.com/users/daspete/gists{/gist_id}","starred_url":"https://api.github.com/users/daspete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daspete/subscriptions","organizations_url":"https://api.github.com/users/daspete/orgs","repos_url":"https://api.github.com/users/daspete/repos","events_url":"https://api.github.com/users/daspete/events{/privacy}","received_events_url":"https://api.github.com/users/daspete/received_events","type":"User","site_admin":false},"created_at":"2016-06-03T14:35:46Z","updated_at":"2016-06-03T14:35:46Z","body":"Hi there,\r\n\r\ni've started a little project to integrate patternlab to laravel and it kind of works... many things to do... maybe it can be done better.... feedback is very welcome :)\r\n\r\nThe package can be found here: [patternlab-twig-laravel](https://packagist.org/packages/daspete/patternlab-twig-laravel)"}}
{"actor":{"display_login":"daspete"}}