From 2a6e9428562c002d9266b2892acdf4794ef05f7c Mon Sep 17 00:00:00 2001 From: Beto Cantu Date: Sat, 9 Mar 2019 17:34:28 -0600 Subject: [PATCH] mu compatibility --- .../files/{app => __path__}/styles/app.scss | 0 blueprints/embercasts-library-styles/index.js | 20 +++++++++++++++++++ 2 files changed, 20 insertions(+) rename blueprints/embercasts-library-styles/files/{app => __path__}/styles/app.scss (100%) diff --git a/blueprints/embercasts-library-styles/files/app/styles/app.scss b/blueprints/embercasts-library-styles/files/__path__/styles/app.scss similarity index 100% rename from blueprints/embercasts-library-styles/files/app/styles/app.scss rename to blueprints/embercasts-library-styles/files/__path__/styles/app.scss diff --git a/blueprints/embercasts-library-styles/index.js b/blueprints/embercasts-library-styles/index.js index 5a09c9b..6291887 100644 --- a/blueprints/embercasts-library-styles/index.js +++ b/blueprints/embercasts-library-styles/index.js @@ -1,6 +1,10 @@ /* eslint-env node */ const semver = require('semver'); +function isModuleUnificationProject(project) { + return project && project.isModuleUnification && project.isModuleUnification(); +} + module.exports = { description: '', @@ -8,6 +12,22 @@ module.exports = { }, + fileMapTokens() { + if (isModuleUnificationProject(this.project)) { + return { + __path__() { + return 'src/ui'; + } + }; + } else { + return { + __path__() { + return 'app'; + } + }; + } + }, + afterInstall: function({ project }) { const emberSource = project.addonPackages['ember-source']; const emberVersion = emberSource.pkg.version;