{"action":"created","issue":{"url":"https://api.github.com/repos/cucumber/cucumber-js/issues/831","repository_url":"https://api.github.com/repos/cucumber/cucumber-js","labels_url":"https://api.github.com/repos/cucumber/cucumber-js/issues/831/labels{/name}","comments_url":"https://api.github.com/repos/cucumber/cucumber-js/issues/831/comments","events_url":"https://api.github.com/repos/cucumber/cucumber-js/issues/831/events","html_url":"https://github.com/cucumber/cucumber-js/pull/831","id":227935565,"number":831,"title":"WIP: feat(support-code): Allow direct import","user":{"login":"nicojs","id":1828233,"avatar_url":"https://avatars0.githubusercontent.com/u/1828233?v=3","gravatar_id":"","url":"https://api.github.com/users/nicojs","html_url":"https://github.com/nicojs","followers_url":"https://api.github.com/users/nicojs/followers","following_url":"https://api.github.com/users/nicojs/following{/other_user}","gists_url":"https://api.github.com/users/nicojs/gists{/gist_id}","starred_url":"https://api.github.com/users/nicojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicojs/subscriptions","organizations_url":"https://api.github.com/users/nicojs/orgs","repos_url":"https://api.github.com/users/nicojs/repos","events_url":"https://api.github.com/users/nicojs/events{/privacy}","received_events_url":"https://api.github.com/users/nicojs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2017-05-11T09:45:50Z","updated_at":"2017-05-25T14:56:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cucumber/cucumber-js/pulls/831","html_url":"https://github.com/cucumber/cucumber-js/pull/831","diff_url":"https://github.com/cucumber/cucumber-js/pull/831.diff","patch_url":"https://github.com/cucumber/cucumber-js/pull/831.patch"},"body":"Allow direct import of support code:\r\n\r\n```javascript\r\nconst { \r\n  Given,\r\n  When,\r\n  Then,\r\n  Before,\r\n  After,\r\n  defineParameterType, \r\n  addTransform, \r\n  defineStep, \r\n  registerHandler, \r\n  registerListener, \r\n  setDefaultTimeout, \r\n  setDefinitionFunctionWrapper, \r\n  setWorldConstructor \r\n} = require('cucumber');\r\n```\r\n\r\nTodo:\r\n- [ ] Decide if we're keeping the `defineSupportCode`\r\n- [ ] Update all feature files (or write new ones, if we decide to keep `defineSupportCode`)\r\n- [ ] Update all docs (or add to the existing docs of we decide to keep `defineSupportCode`)\r\n\r\nI personally think that its better to not export `defineSupportCode` from `cucumber` anymore. It will simplify the docs and features. I know there will initially be a pain for existing code that would need to be rewritten, but it will be much simpler in the end.\r\n\r\nNote: related PR #828 was my first attempt.\r\n\r\nFixes issue #770 "},"comment":{"url":"https://api.github.com/repos/cucumber/cucumber-js/issues/comments/304031334","html_url":"https://github.com/cucumber/cucumber-js/pull/831#issuecomment-304031334","issue_url":"https://api.github.com/repos/cucumber/cucumber-js/issues/831","id":304031334,"user":{"login":"lgandecki","id":4002543,"avatar_url":"https://avatars2.githubusercontent.com/u/4002543?v=3","gravatar_id":"","url":"https://api.github.com/users/lgandecki","html_url":"https://github.com/lgandecki","followers_url":"https://api.github.com/users/lgandecki/followers","following_url":"https://api.github.com/users/lgandecki/following{/other_user}","gists_url":"https://api.github.com/users/lgandecki/gists{/gist_id}","starred_url":"https://api.github.com/users/lgandecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgandecki/subscriptions","organizations_url":"https://api.github.com/users/lgandecki/orgs","repos_url":"https://api.github.com/users/lgandecki/repos","events_url":"https://api.github.com/users/lgandecki/events{/privacy}","received_events_url":"https://api.github.com/users/lgandecki/received_events","type":"User","site_admin":false},"created_at":"2017-05-25T14:56:20Z","updated_at":"2017-05-25T14:56:20Z","body":"Coming from cucumber 1 - I love the proposed cleaner syntax! :) "}}
{"actor":{"display_login":"lgandecki"}}