{"action":"created","issue":{"url":"https://api.github.com/repos/saojs/sao/issues/82","repository_url":"https://api.github.com/repos/saojs/sao","labels_url":"https://api.github.com/repos/saojs/sao/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/saojs/sao/issues/82/comments","events_url":"https://api.github.com/repos/saojs/sao/issues/82/events","html_url":"https://github.com/saojs/sao/issues/82","id":300949764,"number":82,"title":"1.0 roadmap","user":{"login":"egoist","id":8784712,"avatar_url":"https://avatars2.githubusercontent.com/u/8784712?v=4","gravatar_id":"","url":"https://api.github.com/users/egoist","html_url":"https://github.com/egoist","followers_url":"https://api.github.com/users/egoist/followers","following_url":"https://api.github.com/users/egoist/following{/other_user}","gists_url":"https://api.github.com/users/egoist/gists{/gist_id}","starred_url":"https://api.github.com/users/egoist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egoist/subscriptions","organizations_url":"https://api.github.com/users/egoist/orgs","repos_url":"https://api.github.com/users/egoist/repos","events_url":"https://api.github.com/users/egoist/events{/privacy}","received_events_url":"https://api.github.com/users/egoist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-28T09:29:03Z","updated_at":"2018-02-28T13:06:45Z","closed_at":null,"author_association":"OWNER","body":"## API rewrite\r\n\r\n```js\r\nconst sao = new SAO({\r\n\ttemplate: './path/to/template'\r\n})\r\n\r\nawait sao.generate({\r\n\toutDir: path.resolve('my-project') \r\n})\r\n\r\nawait sao.generate({\r\n\tmock: true,\r\n\toutDir: path.resolve('my-project') \r\n})\r\n```\r\n\r\n## Combine templates\r\n\r\n`template-foo`:\r\n\r\n```js\r\n// template-foo/saofile.js\r\nmodule.exports = {\r\n\ttemplates: ['bar', 'baz']\r\n}\r\n```\r\n\r\n`sao foo` will invoke `template-bar` `template-baz` in order.\r\n\r\n`sao foo:bar` will invoke `template-bar` only"},"comment":{"url":"https://api.github.com/repos/saojs/sao/issues/comments/369233388","html_url":"https://github.com/saojs/sao/issues/82#issuecomment-369233388","issue_url":"https://api.github.com/repos/saojs/sao/issues/82","id":369233388,"user":{"login":"kristianmandrup","id":125005,"avatar_url":"https://avatars3.githubusercontent.com/u/125005?v=4","gravatar_id":"","url":"https://api.github.com/users/kristianmandrup","html_url":"https://github.com/kristianmandrup","followers_url":"https://api.github.com/users/kristianmandrup/followers","following_url":"https://api.github.com/users/kristianmandrup/following{/other_user}","gists_url":"https://api.github.com/users/kristianmandrup/gists{/gist_id}","starred_url":"https://api.github.com/users/kristianmandrup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristianmandrup/subscriptions","organizations_url":"https://api.github.com/users/kristianmandrup/orgs","repos_url":"https://api.github.com/users/kristianmandrup/repos","events_url":"https://api.github.com/users/kristianmandrup/events{/privacy}","received_events_url":"https://api.github.com/users/kristianmandrup/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T13:06:45Z","updated_at":"2018-02-28T13:06:45Z","author_association":"NONE","body":"Hmm, maybe that is already possible, just hard to understand from the docs how to do this:\r\n\r\n```js\r\n  // get template engine\r\n  if (projectConfig.template === 'handlebars') {\r\n    kopyOptions.template = require('jstransformer-handlebars')\r\n  } else if (typeof projectConfig.template === 'string') {\r\n    kopyOptions.template = utils.requireAt(\r\n      fromPath,\r\n      `jstransformer-${projectConfig.template}`\r\n    )\r\n  } else {\r\n    kopyOptions.template = projectConfig.template\r\n  }\r\n```"}}
{"actor":{"display_login":"kristianmandrup"}}