{"action":"created","issue":{"url":"https://api.github.com/repos/revel/revel/issues/889","labels_url":"https://api.github.com/repos/revel/revel/issues/889/labels{/name}","comments_url":"https://api.github.com/repos/revel/revel/issues/889/comments","events_url":"https://api.github.com/repos/revel/revel/issues/889/events","html_url":"https://github.com/revel/revel/issues/889","id":60158590,"number":889,"title":"Script runner","user":{"login":"rtm7777","id":1252290,"avatar_url":"https://avatars.githubusercontent.com/u/1252290?v=3","gravatar_id":"","url":"https://api.github.com/users/rtm7777","html_url":"https://github.com/rtm7777","followers_url":"https://api.github.com/users/rtm7777/followers","following_url":"https://api.github.com/users/rtm7777/following{/other_user}","gists_url":"https://api.github.com/users/rtm7777/gists{/gist_id}","starred_url":"https://api.github.com/users/rtm7777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtm7777/subscriptions","organizations_url":"https://api.github.com/users/rtm7777/orgs","repos_url":"https://api.github.com/users/rtm7777/repos","events_url":"https://api.github.com/users/rtm7777/events{/privacy}","received_events_url":"https://api.github.com/users/rtm7777/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/revel/revel/labels/needs%20RFC","name":"needs RFC","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-06T21:05:17Z","updated_at":"2015-04-04T17:05:47Z","closed_at":null,"body":"What is the best way to create script for database init or something else in Revel?\r\n\r\nSomething like it in Rails rake:\r\n\r\n      rake db:seed\r\n\r\nI want to create folder in project named `scripts`, with several scripts for initialize db data for development and others. Scripts should have an access to initialized revel app, its methods and db connection.\r\n\r\nWe have cmd tool, it can run all test and separately one by one. Maybe we can do something like this for scripts? Like:\r\n\r\n    revel runscript script_name\r\n\r\nAlso we have a jobs, but I want run this scripts separately from app.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/revel/revel/issues/comments/89614910","html_url":"https://github.com/revel/revel/issues/889#issuecomment-89614910","issue_url":"https://api.github.com/repos/revel/revel/issues/889","id":89614910,"user":{"login":"anonx","id":6612636,"avatar_url":"https://avatars.githubusercontent.com/u/6612636?v=3","gravatar_id":"","url":"https://api.github.com/users/anonx","html_url":"https://github.com/anonx","followers_url":"https://api.github.com/users/anonx/followers","following_url":"https://api.github.com/users/anonx/following{/other_user}","gists_url":"https://api.github.com/users/anonx/gists{/gist_id}","starred_url":"https://api.github.com/users/anonx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anonx/subscriptions","organizations_url":"https://api.github.com/users/anonx/orgs","repos_url":"https://api.github.com/users/anonx/repos","events_url":"https://api.github.com/users/anonx/events{/privacy}","received_events_url":"https://api.github.com/users/anonx/received_events","type":"User","site_admin":false},"created_at":"2015-04-04T17:05:47Z","updated_at":"2015-04-04T17:05:47Z","body":"https://github.com/revel/rfcs/pull/2 is a proposal to transform `revel` command into a files watcher and task runner. Every project will have `.revel.yml` in the format like:\r\n```yml\r\ninit:\r\n  --- # Add your list of what should be done every time `revel run` is started.\r\n  - npm install coffeescript\r\nwatchers:\r\n  --- # Include a list of commands that are expected to be executed on files' change.\r\n  -\r\n    --- # Recompile my app every time my controllers are modified.\r\n    path: app/controllers/*.go\r\n    before:\r\n    action:\r\n      - go generate path/to/myapp\r\n      - go build path/to/myapp\r\n      - go run path/to/myapp\r\n    after:\r\n  -\r\n    --- # Compile my coffee script files to JS.\r\n    path: app/assets/coffee/*\r\n    action:\r\n      - coffeescript -smth -smth_else\r\n```\r\nSimply saying, the only responsibility of `revel` will be watching files and executing commands requested in `.revel.yml`. Thus, it will close #620, too."}}