{"action":"opened","issue":{"url":"https://api.github.com/repos/pattern-lab/patternlab-php/issues/391","repository_url":"https://api.github.com/repos/pattern-lab/patternlab-php","labels_url":"https://api.github.com/repos/pattern-lab/patternlab-php/issues/391/labels{/name}","comments_url":"https://api.github.com/repos/pattern-lab/patternlab-php/issues/391/comments","events_url":"https://api.github.com/repos/pattern-lab/patternlab-php/issues/391/events","html_url":"https://github.com/pattern-lab/patternlab-php/issues/391","id":243448750,"number":391,"title":"Serving patternlab doesn't seem to work correctly from a gulp shell task","user":{"login":"zorida","id":4152479,"avatar_url":"https://avatars7.githubusercontent.com/u/4152479?v=4","gravatar_id":"","url":"https://api.github.com/users/zorida","html_url":"https://github.com/zorida","followers_url":"https://api.github.com/users/zorida/followers","following_url":"https://api.github.com/users/zorida/following{/other_user}","gists_url":"https://api.github.com/users/zorida/gists{/gist_id}","starred_url":"https://api.github.com/users/zorida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zorida/subscriptions","organizations_url":"https://api.github.com/users/zorida/orgs","repos_url":"https://api.github.com/users/zorida/repos","events_url":"https://api.github.com/users/zorida/events{/privacy}","received_events_url":"https://api.github.com/users/zorida/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-17T16:15:26Z","updated_at":"2017-07-17T16:15:26Z","closed_at":null,"body":"Whenever i try to use Gulp with gulpfile.js in the project root to serve patternlab, whose folder is placed at first level inside the project (i.e. in '[project folder]/styleguide'), i manage to generate (build) the patterns, but not to serve them. \r\n```\r\n$ gulp pl-serve\r\n[17:30:33] Using gulpfile ~/[foldername]/gulpfile.js\r\n[17:30:33] Starting 'pl-serve'...\r\n\r\nevents.js:160\r\n      throw er; // Unhandled 'error' event\r\n      ^\r\nError: Command failed: php core/console -s --with-watch\r\n\r\n    at ChildProcess.exithandler (child_process.js:204:12)\r\n    at emitTwo (events.js:106:13)\r\n    at ChildProcess.emit (events.js:191:7)\r\n    at maybeClose (internal/child_process.js:886:16)\r\n    at Socket.<anonymous> (internal/child_process.js:342:11)\r\n    at emitOne (events.js:96:13)\r\n    at Socket.emit (events.js:188:7)\r\n    at Pipe._handle.close [as _onclose] (net.js:501:12)\r\n```\r\n\r\nmy code inside the gulpfile.js related to the 'pl-serve' task:\r\n\r\n```\r\ngulp.task('pl-serve', function() {\r\n  var options = {\r\n    continueOnError: false, // default = false, true means don't emit error event\r\n    pipeStdout: false, // default = false, true means stdout is written to file.contents\r\n    customTemplatingThing: \"test\" // content passed to gutil.template()\r\n  };\r\n  return gulp.src('./styleguide')\r\n      .pipe(exec('php core/console -s --with-watch', options)).pipe(exec.reporter());\r\n});\r\n```\r\nI tried the following:\r\nusing only one command i.e. `exec('php styleguide/core/console -s --with-watch' )` ;\r\nusing the expression for consecutive commands i.e. `exec('(cd styleguide;php core/console -s --with-watch)' )` with and without round brackets;\r\nreplacing -s with --server;\r\nusing the currently deprecated gulp-shell extension instead of gulp-exec.\r\n\r\nif I use the terminal to move inside styleguide folder, and type 'php core/console -s --with-watch', the site is generated and served on the local host, and patternlab seems able to correctly detect changes in .twig files. \r\n\r\nMaybe I'm doing something wrong, I used PL both in node and php versions and now I can't get it to work from there. It is not mandatory, but it could be useful.\r\nAny help would be appreciated. Thanks in advance. "}}
{"actor":{"display_login":"zorida"}}