{"action":"created","issue":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/412","labels_url":"https://api.github.com/repos/jspm/jspm-cli/issues/412/labels{/name}","comments_url":"https://api.github.com/repos/jspm/jspm-cli/issues/412/comments","events_url":"https://api.github.com/repos/jspm/jspm-cli/issues/412/events","html_url":"https://github.com/jspm/jspm-cli/issues/412","id":54669733,"number":412,"title":"Improved build API","user":{"login":"theefer","id":36964,"avatar_url":"https://avatars.githubusercontent.com/u/36964?v=3","gravatar_id":"","url":"https://api.github.com/users/theefer","html_url":"https://github.com/theefer","followers_url":"https://api.github.com/users/theefer/followers","following_url":"https://api.github.com/users/theefer/following{/other_user}","gists_url":"https://api.github.com/users/theefer/gists{/gist_id}","starred_url":"https://api.github.com/users/theefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theefer/subscriptions","organizations_url":"https://api.github.com/users/theefer/orgs","repos_url":"https://api.github.com/users/theefer/repos","events_url":"https://api.github.com/users/theefer/events{/privacy}","received_events_url":"https://api.github.com/users/theefer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":36,"created_at":"2015-01-17T18:08:00Z","updated_at":"2015-10-08T12:40:44Z","closed_at":"2015-03-24T23:36:05Z","body":"When using jspm, I've found it quite refreshing not having to fiddle around with extra layers of build tools to compile my JS, minify it, etc. (disclaimer: that's in spite of me being the author of yet another build build tool called [Plumber](https://github.com/plumberjs/plumber)).\r\n\r\nHowever, I believe sometimes we'll want to apply further transforms as part of the build. The ones I have in mind include [ng-annotate](https://github.com/olov/ng-annotate) and asset hashing.\r\n\r\nI believe all the transforms I'm interested in could be done post-bundling (without minification), so I'd end up with:\r\n\r\n`jspm bundle | ng-annotate | uglify2 | asset-hash`\r\n\r\nThat's all fine and doable today, except the fact that `jspm bundle` writes the built filename to the `config.js`, but if we do further operations *including changing the filename* (asset hash), then we need to update the `config.js` again. This could be hacked in as a post-transforms hook, but I'm interested in doing this \"properly\". I'm also really keen not to bloat jspm with all possible transforms people may want to apply.\r\n\r\nAny thoughts on how this could work?\r\n\r\nNote that I'm not thinking of any build tool in particular (Grunt, Gulp, Plumber, Gobble, etc).\r\n\r\nIn its simplest form, could be use the jspm API to get the bundle and its sourcemap out programmatically (i.e. not writing it to the filesystem and not updating config.js), apply our transforms, and then use the API again to record the filename of whatever we did in the config.js?"},"comment":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/comments/146525754","html_url":"https://github.com/jspm/jspm-cli/issues/412#issuecomment-146525754","issue_url":"https://api.github.com/repos/jspm/jspm-cli/issues/412","id":146525754,"user":{"login":"klausbayrhammer","id":1397470,"avatar_url":"https://avatars.githubusercontent.com/u/1397470?v=3","gravatar_id":"","url":"https://api.github.com/users/klausbayrhammer","html_url":"https://github.com/klausbayrhammer","followers_url":"https://api.github.com/users/klausbayrhammer/followers","following_url":"https://api.github.com/users/klausbayrhammer/following{/other_user}","gists_url":"https://api.github.com/users/klausbayrhammer/gists{/gist_id}","starred_url":"https://api.github.com/users/klausbayrhammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klausbayrhammer/subscriptions","organizations_url":"https://api.github.com/users/klausbayrhammer/orgs","repos_url":"https://api.github.com/users/klausbayrhammer/repos","events_url":"https://api.github.com/users/klausbayrhammer/events{/privacy}","received_events_url":"https://api.github.com/users/klausbayrhammer/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T12:40:44Z","updated_at":"2015-10-08T12:40:44Z","body":"@guybedford the proposed `jspm.updateConfig` api sounds very useful. Did you make any progress on that? Is there a way we could support you?"}}