{"action":"closed","issue":{"url":"https://api.github.com/repos/bdkjones/CodeKit/issues/596","labels_url":"https://api.github.com/repos/bdkjones/CodeKit/issues/596/labels{/name}","comments_url":"https://api.github.com/repos/bdkjones/CodeKit/issues/596/comments","events_url":"https://api.github.com/repos/bdkjones/CodeKit/issues/596/events","html_url":"https://github.com/bdkjones/CodeKit/issues/596","id":120120756,"number":596,"title":"Hook keeps looping","user":{"login":"kosmiq","id":322759,"avatar_url":"https://avatars.githubusercontent.com/u/322759?v=3","gravatar_id":"","url":"https://api.github.com/users/kosmiq","html_url":"https://github.com/kosmiq","followers_url":"https://api.github.com/users/kosmiq/followers","following_url":"https://api.github.com/users/kosmiq/following{/other_user}","gists_url":"https://api.github.com/users/kosmiq/gists{/gist_id}","starred_url":"https://api.github.com/users/kosmiq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kosmiq/subscriptions","organizations_url":"https://api.github.com/users/kosmiq/orgs","repos_url":"https://api.github.com/users/kosmiq/repos","events_url":"https://api.github.com/users/kosmiq/events{/privacy}","received_events_url":"https://api.github.com/users/kosmiq/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-03T08:53:20Z","updated_at":"2015-12-03T17:55:17Z","closed_at":"2015-12-03T17:55:17Z","body":"So I just started out using a Hook for a current project. The hook is supersimple, it just runs \"grunt grunticon\" (https://github.com/filamentgroup/grunticon)\r\n\r\n![ck_hooks](https://cloud.githubusercontent.com/assets/322759/11555632/04a62742-99a2-11e5-9d8e-94da4609971a.png)\r\n\r\nI have tried other settings to trigger the hook than those above, like the default, looking for minified files and so (but all JS-files).\r\n\r\nWhat happens is that when I save \"scripts.js\" it gets processed as it should by CodeKit, minified and saved just fine. The hook will launch \"grunt grunticon\" (it does what it should) and generate all its stuff, including the file \"grunticon.loader.js\" which I also prepend to scripts.js.\r\n\r\nI guess this is where things gets... Weird.\r\n\r\nSo in short:\r\n* CodeKit runs and concatenate files and scripts.\r\n* It executes \"grunt grunticon\" in the project folder\r\n* Grunticon will generate grunticon.loader.js which is prepended into scripts.js\r\n* It loops the hook, over and over again.\r\n\r\nI guess it is because I save the script file, it runs the hook, a prepended file is changed, so CodeKit does it thing with uglify, concatetate and minify, and runs the hook again and it all starts over.\r\n\r\nIs there a simple fix for this or should I simply stick to having it run on whenever style.css changes or whatever? I am aware that I might be seriously stupid here prepending a file that's created by a hook..."}}