{"action":"closed","issue":{"url":"https://api.github.com/repos/balderdashy/sails/issues/3193","labels_url":"https://api.github.com/repos/balderdashy/sails/issues/3193/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails/issues/3193/comments","events_url":"https://api.github.com/repos/balderdashy/sails/issues/3193/events","html_url":"https://github.com/balderdashy/sails/issues/3193","id":103932930,"number":3193,"title":"More than 2 environnements","user":{"login":"jaumard","id":2970449,"avatar_url":"https://avatars.githubusercontent.com/u/2970449?v=3","gravatar_id":"","url":"https://api.github.com/users/jaumard","html_url":"https://github.com/jaumard","followers_url":"https://api.github.com/users/jaumard/followers","following_url":"https://api.github.com/users/jaumard/following{/other_user}","gists_url":"https://api.github.com/users/jaumard/gists{/gist_id}","starred_url":"https://api.github.com/users/jaumard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaumard/subscriptions","organizations_url":"https://api.github.com/users/jaumard/orgs","repos_url":"https://api.github.com/users/jaumard/repos","events_url":"https://api.github.com/users/jaumard/events{/privacy}","received_events_url":"https://api.github.com/users/jaumard/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-30T16:28:15Z","updated_at":"2015-08-30T20:04:52Z","closed_at":"2015-08-30T20:04:52Z","body":"Hi,\r\n\r\nI want to add more of 2 environnements on a sails project. As I see it's not possible cause of sails.hook.grunt who do this : \r\n\r\n```\r\ninitialize: function (cb) {\r\n\r\n      sails.log.verbose('Loading app Gruntfile...');\r\n\r\n      // Start task depending on environment\r\n      if(sails.config.environment === 'production'){\r\n        return this.runTask('prod', cb);\r\n      }\r\n\r\n      this.runTask('default', cb);\r\n    },\r\n```\r\nAnd sails who use this : \r\nhttps://github.com/balderdashy/sails/blob/a210b48667708bea687dd5ec61ce9e07ffc0c005/lib/app/configuration/load.js#L73\r\n\r\nIt would be nice to remove --prod parameter (or keep it for compatibility) and add --env=production (or another env) instead.\r\nAnd for sails.hook.grunt to change it to : \r\n```\r\ninitialize: function (cb) {\r\n\r\n      sails.log.verbose('Loading app Gruntfile...');\r\n\r\n      // Start task depending on environment\r\n      if(sails.config.environment != 'development'){\r\n        return this.runTask(sails.config.environment, cb);\r\n      }\r\n\r\n      this.runTask('default', cb);\r\n    },\r\n```\r\nprod.js task have to be rename in production.js but like this we can add environnement easily and add custom config file in config/env.\r\nAlso we can check if there a task name like sails.config.environment to be sure and if it's not run default one.\r\n\r\nWhat do you think ? Is there another thing to do ? \r\nMaybe I can find some time to make all the PR with some help/directive if anyone want."}}