{"action":"created","issue":{"url":"https://api.github.com/repos/dbfannin/ngx-logger/issues/53","repository_url":"https://api.github.com/repos/dbfannin/ngx-logger","labels_url":"https://api.github.com/repos/dbfannin/ngx-logger/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/dbfannin/ngx-logger/issues/53/comments","events_url":"https://api.github.com/repos/dbfannin/ngx-logger/issues/53/events","html_url":"https://github.com/dbfannin/ngx-logger/issues/53","id":309190134,"number":53,"title":"Rework the build system","user":{"login":"jasekiw","id":4037224,"avatar_url":"https://avatars3.githubusercontent.com/u/4037224?v=4","gravatar_id":"","url":"https://api.github.com/users/jasekiw","html_url":"https://github.com/jasekiw","followers_url":"https://api.github.com/users/jasekiw/followers","following_url":"https://api.github.com/users/jasekiw/following{/other_user}","gists_url":"https://api.github.com/users/jasekiw/gists{/gist_id}","starred_url":"https://api.github.com/users/jasekiw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasekiw/subscriptions","organizations_url":"https://api.github.com/users/jasekiw/orgs","repos_url":"https://api.github.com/users/jasekiw/repos","events_url":"https://api.github.com/users/jasekiw/events{/privacy}","received_events_url":"https://api.github.com/users/jasekiw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-03-28T01:33:20Z","updated_at":"2018-03-28T16:51:13Z","closed_at":null,"author_association":"NONE","body":"When working with the library I noticed a few things:\r\n\r\n* The build system breaks when the project is npm-linked because it attempts to remove the dist folder when linked.\r\n* The build system uses ngc then pushes that into rollup when building dist.\r\n* Tests are not running with error `You need to include some adapter that implements __karma__.start method!` I assume this is because there is not a karma.conf configuration file or the main test entry point file.\r\n\r\n### npm link\r\n\r\nThis one is as easy as removing clean from the build command. Why does the folder need to be cleaned? I haven't thought of a use case for that on build.\r\n\r\n### Bundling\r\n\r\nA rolled up bundle prevents importing parts of the library and breaks tree shaking.\r\n\r\nex. I cannot write the following import\r\n\r\n```\r\nimport {HttpService} from 'ngx-logger/adapters/http.service';\r\n```\r\nhere the subfolder is made up. I am just testing to see if I can export one class without referencing the index. I added a class there just to see if it can import it and it can't.\r\n\r\nIt results in this error.\r\n```\r\nModule not found: Error: Can't resolve 'ngx-logger/adapters/http.service' in 'C:\\Users\\Jason\\test-ng\\src\\app'\r\n```\r\n\r\nI rollup build is good for a project that does not have a build system but I think we can assume that if they are running angular then they have a build system like @angular/cli or a similar webpack configuration. \r\n\r\n**Why remove rollup from the dist buld?** It will allow tree shaking.\r\n**Why should this repository include tree shaking?** Now that the package supports a custom http service for the server logging, the user may not want to include the default http service in their bundle.\r\n\r\n### Unit Tests\r\n\r\nThere does need to be a bundle system for the unit tests however. It seems like there isn't any karma.conf set up either. I have a branch I am working on right now for setting up karma. \r\n\r\n\r\n------------------------------------------\r\n\r\nI would like to work on this but I want to ask if there is other input before I write it. @dbfannin \r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dbfannin/ngx-logger/issues/comments/376957043","html_url":"https://github.com/dbfannin/ngx-logger/issues/53#issuecomment-376957043","issue_url":"https://api.github.com/repos/dbfannin/ngx-logger/issues/53","id":376957043,"user":{"login":"dbfannin","id":15847407,"avatar_url":"https://avatars3.githubusercontent.com/u/15847407?v=4","gravatar_id":"","url":"https://api.github.com/users/dbfannin","html_url":"https://github.com/dbfannin","followers_url":"https://api.github.com/users/dbfannin/followers","following_url":"https://api.github.com/users/dbfannin/following{/other_user}","gists_url":"https://api.github.com/users/dbfannin/gists{/gist_id}","starred_url":"https://api.github.com/users/dbfannin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbfannin/subscriptions","organizations_url":"https://api.github.com/users/dbfannin/orgs","repos_url":"https://api.github.com/users/dbfannin/repos","events_url":"https://api.github.com/users/dbfannin/events{/privacy}","received_events_url":"https://api.github.com/users/dbfannin/received_events","type":"User","site_admin":false},"created_at":"2018-03-28T16:51:13Z","updated_at":"2018-03-28T16:51:13Z","author_association":"OWNER","body":"@jasekiw, ahh. Sorry, when I originally read this, I misunderstood your intent. I'm not opposed to coming up with a new build process. As long as it is something that doesn't require maintenance. The benefit of using the angular2-library generator, is that they keep it up to date, and pulling in the latest generator code is very easy. \r\n\r\nIf you have some ideas on how we can improve this, without adding extra maintenance work, I'm all for it. "}}
{"actor":{"display_login":"dbfannin"}}