Repository: ember-cli/ember-cli (js)

Issue:
Add environment output when building
Hi, I would love to see what environment I'm building for when I run `ember b` or in general any script that will trigger run for me.

Something like this
```bash
user@bash>ember b
Building
Environment: development
.....
```

Pull request description:
Prints environment in console during build
Fixes #7480

Patch:
diff --git a/lib/tasks/build-watch.js b/lib/tasks/build-watch.js
index 0e34f9545..235cc3a46 100644
--- a/lib/tasks/build-watch.js
+++ b/lib/tasks/build-watch.js
@@ -15,21 +15,25 @@ class BuildWatchTask extends Task {
   }
 
   run(options) {
-    this.ui.startProgress(
+    let { ui } = this;
+
+    ui.startProgress(
       chalk.green('Building'), chalk.green('.')
     );
 
     this._runDeferred = RSVP.defer();
 
     let builder = this._builder = options._builder || new Builder({
-      ui: this.ui,
+      ui,
       outputPath: options.outputPath,
       environment: options.environment,
       project: this.project,
     });
 
+    ui.writeLine(`Environment: ${options.environment}`);
+
     let watcher = options._watcher || new Watcher({
-      ui: this.ui,
+      ui,
       builder,
       analytics: this.analytics,
       options,
diff --git a/lib/tasks/build.js b/lib/tasks/build.js
index 0bfe1eb36..5bef3c817 100644
--- a/lib/tasks/build.js
+++ b/lib/tasks/build.js
@@ -19,6 +19,8 @@ class BuildTask extends Task {
       project: this.project,
     });
 
+    ui.writeLine(`Environment: ${options.environment}`);
+
     let annotation = {
       type: 'initial',
       reason: 'build',


Test patch:
diff --git a/tests/integration/tasks/build-test.js b/tests/integration/tasks/build-test.js
index c9ff31f24..e40e0dfbc 100644
--- a/tests/integration/tasks/build-test.js
+++ b/tests/integration/tasks/build-test.js
@@ -96,4 +96,22 @@ describe('build task test', function() {
         expect(Array.isArray(output.nodes)).to.equal(true);
       });
   });
+
+  it('it displays environment', function() {
+    let outputPath = 'dist';
+    let task = new BuildTask({
+      analytics: new MockAnalytics(),
+      project,
+      ui,
+    });
+
+    let runOptions = {
+      outputPath,
+      environment: 'development',
+    };
+
+    return task.run(runOptions).then(() => {
+      expect(ui.output).to.include('Environment: development');
+    });
+  });
 });
diff --git a/tests/unit/tasks/build-watch-test.js b/tests/unit/tasks/build-watch-test.js
index fcdae9876..c665e3b7d 100644
--- a/tests/unit/tasks/build-watch-test.js
+++ b/tests/unit/tasks/build-watch-test.js
@@ -69,6 +69,7 @@ describe('build-watch task', function() {
 
       return runPromise.then(() => {
         expect(ui.output).to.include('cleaning up...');
+        expect(ui.output).to.include('Environment: test');
       });
     });
   });