From 4f8d615b5f5529f0422ea997d7c67d82be984106 Mon Sep 17 00:00:00 2001 From: Kimberly Nicholls Date: Fri, 21 Jul 2017 10:49:09 -0700 Subject: [PATCH] build sass-variables.js in preBuild, not postBuild generate sass-variables.js before the build so it will be included in the dist output building in postBuild doesn't work for CI: - run ember test - builds project to dist - generates utils/sass-variables.js - runs tests with code from dist, but utils/sass-variables.js not in that build because it didn't exist yet it works for development (with `ember server`) because touching the file causes a rebuild it works for production if a previous build (`ember test`) created the file --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 08a61d0..75eb769 100644 --- a/index.js +++ b/index.js @@ -40,7 +40,7 @@ module.exports = { this.appDir = this.app.options.appDir || 'app'; this.variablesFile = this.app.options.sassVariables || null; }, - postBuild: function(result) { + preBuild: function(result) { if (this.variablesFile) { var outputPath = this.appDir + '/utils/sass-variables.js'; var sassVariables = null;