{"action":"created","issue":{"url":"https://api.github.com/repos/mgechev/angular-seed/issues/1511","repository_url":"https://api.github.com/repos/mgechev/angular-seed","labels_url":"https://api.github.com/repos/mgechev/angular-seed/issues/1511/labels{/name}","comments_url":"https://api.github.com/repos/mgechev/angular-seed/issues/1511/comments","events_url":"https://api.github.com/repos/mgechev/angular-seed/issues/1511/events","html_url":"https://github.com/mgechev/angular-seed/pull/1511","id":184266303,"number":1511,"title":"Add staging support as documented","user":{"login":"doapp-ryanp","id":1036546,"avatar_url":"https://avatars.githubusercontent.com/u/1036546?v=3","gravatar_id":"","url":"https://api.github.com/users/doapp-ryanp","html_url":"https://github.com/doapp-ryanp","followers_url":"https://api.github.com/users/doapp-ryanp/followers","following_url":"https://api.github.com/users/doapp-ryanp/following{/other_user}","gists_url":"https://api.github.com/users/doapp-ryanp/gists{/gist_id}","starred_url":"https://api.github.com/users/doapp-ryanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doapp-ryanp/subscriptions","organizations_url":"https://api.github.com/users/doapp-ryanp/orgs","repos_url":"https://api.github.com/users/doapp-ryanp/repos","events_url":"https://api.github.com/users/doapp-ryanp/events{/privacy}","received_events_url":"https://api.github.com/users/doapp-ryanp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-20T15:43:33Z","updated_at":"2016-10-20T16:48:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mgechev/angular-seed/pulls/1511","html_url":"https://github.com/mgechev/angular-seed/pull/1511","diff_url":"https://github.com/mgechev/angular-seed/pull/1511.diff","patch_url":"https://github.com/mgechev/angular-seed/pull/1511.patch"},"body":"https://github.com/mgechev/angular-seed#environment-configuration says `staging` is currently supported. This PR adds that."},"comment":{"url":"https://api.github.com/repos/mgechev/angular-seed/issues/comments/255162481","html_url":"https://github.com/mgechev/angular-seed/pull/1511#issuecomment-255162481","issue_url":"https://api.github.com/repos/mgechev/angular-seed/issues/1511","id":255162481,"user":{"login":"doapp-ryanp","id":1036546,"avatar_url":"https://avatars.githubusercontent.com/u/1036546?v=3","gravatar_id":"","url":"https://api.github.com/users/doapp-ryanp","html_url":"https://github.com/doapp-ryanp","followers_url":"https://api.github.com/users/doapp-ryanp/followers","following_url":"https://api.github.com/users/doapp-ryanp/following{/other_user}","gists_url":"https://api.github.com/users/doapp-ryanp/gists{/gist_id}","starred_url":"https://api.github.com/users/doapp-ryanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doapp-ryanp/subscriptions","organizations_url":"https://api.github.com/users/doapp-ryanp/orgs","repos_url":"https://api.github.com/users/doapp-ryanp/repos","events_url":"https://api.github.com/users/doapp-ryanp/events{/privacy}","received_events_url":"https://api.github.com/users/doapp-ryanp/received_events","type":"User","site_admin":false},"created_at":"2016-10-20T16:48:50Z","updated_at":"2016-10-20T16:48:50Z","body":"Ok now looking closer at the code I'm confused.  The [inline docs](https://github.com/mgechev/angular-seed/blob/master/tools/config/seed.config.ts#L60) say `getEnvironment` uses the value of `--config-env`.  [The code](https://github.com/mgechev/angular-seed/blob/master/tools/config/seed.config.ts#L601) however sets the build type by looking for `.prod` in the gulp task name.   My guess is just doc typo but please confirm.\r\n\r\nFWIW I'm doing all this work because I have created a gulp task plugin for angular-seed that gzip's assets, adds cache headers (for CloudFront), and invalidates CloudFront cache.  I just want to make sure I understand the angular-seed plumbing here so that I a) get my implementation correct b) make sure its flexible for real world production apps with team(s) of devs\r\n\r\nWhich gets to my last Q I need answered before I do the re-factor discussed above. \r\n\r\nI want to be able to invoke gulp tasks like `publish.prod` and `publish.staging` and `publish.ryanteammember`.  I want my `publish` task plugin to be able to read a config var out of `project.config.ts` like so:\r\n\r\n```js\r\nconstructor(){\r\n...\r\n    this.PUBLISH_TASK_CONFIG.s3['prod'] = {\r\n      region: 'us-east-1',\r\n      params: {\r\n        Bucket: 'www.mydomain.org'\r\n      }\r\n    };\r\n    this.PUBLISH_TASK_CONFIG.s3['staging'] = {\r\n      region: 'us-east-1',\r\n      params: {\r\n        Bucket: 'staging.mydomain.org'\r\n      }\r\n    };\r\n    this.PUBLISH_TASK_CONFIG.s3['ryanteammember'] = {\r\n      region: 'us-east-1',\r\n      params: {\r\n        Bucket: 'ryan.mydomain.org'\r\n      }\r\n    };\r\n```\r\n\r\nWhen I call `publish.staging` the \"build type\" will be `dev` however I want the value of `Config.APP_DEST` to be `dist/prod`.\r\n\r\nQuestions:\r\n\r\n* How do I force a build type of `prod` when my task only contains `publish.staging`?  I could force `Config.ENV` to be `ENVIORNMENTS.PRODUCTION` in my task (ex below) however its too late in the bootstrap process\r\n\r\n```\r\ngulp.task('publish.staging', (done: any) => {\r\n  Config.ENV = ENVIRONMENTS.PRODUCTION;\r\n  return runSequence('publish',\r\n    done)\r\n});\r\n```\r\n* When running a Gulp task - how do I get the value of `--config-env`?  I dump the `Config` object from `tools/config` and don't see it defined.  I can hardcode grabbing assets from `dist/prod` dir however, I need a way to lookup the correct index in `Config.PUBLISH_TASK_CONFIG.s3`.  I had been using `Config.ENV` to do this however I now know that wont work per above...\r\n\r\nDoes this make sense? If not I can put my plugin up on github so you have a full concrete example."}}
{"actor":{"display_login":"doapp-ryanp"}}