From f9ea6fc0a894d37970d0ef3870db275288b97e1c Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 21 Aug 2015 13:30:09 -0400 Subject: [PATCH] Move myth configuration into `Brocfile.js`. --- core/client/Brocfile.js | 6 +++++- core/client/config/environment.js | 14 -------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/core/client/Brocfile.js b/core/client/Brocfile.js index d17571ac68..d39665e6e9 100644 --- a/core/client/Brocfile.js +++ b/core/client/Brocfile.js @@ -1,7 +1,9 @@ /* global require, module */ var EmberApp = require('ember-cli/lib/broccoli/ember-app'), - isProduction = EmberApp.env() === 'production', + environment = EmberApp.env(), + isProduction = environment === 'production', + mythCompress = isProduction || environment === 'test', disabled = {enabled: false}, assetLocation, app; @@ -27,6 +29,8 @@ app = new EmberApp({ source: './app/styles/app.css', inputFile: 'app.css', browsers: 'last 2 versions', + sourcemap: !mythCompress, + compress: mythCompress, outputFile: isProduction ? 'ghost.min.css' : 'ghost.css' }, hinting: false, diff --git a/core/client/config/environment.js b/core/client/config/environment.js index b1d58578bd..55523d6b3e 100644 --- a/core/client/config/environment.js +++ b/core/client/config/environment.js @@ -41,9 +41,6 @@ module.exports = function (environment) { ENV.APP.LOG_TRANSITIONS = true; ENV.APP.LOG_TRANSITIONS_INTERNAL = true; ENV.APP.LOG_VIEW_LOOKUPS = true; - ENV.mythOptions = { - sourcemap: true - }; } if (environment === 'test') { @@ -56,17 +53,6 @@ module.exports = function (environment) { ENV.APP.LOG_VIEW_LOOKUPS = false; ENV.APP.rootElement = '#ember-testing'; - ENV.mythOptions = { - compress: true, - outputFile: 'ghost.min.css' - }; - } - - if (environment === 'production') { - ENV.mythOptions = { - compress: true, - outputFile: 'ghost.min.css' - }; } return ENV;