Skip to content

Commit

Permalink
module-unification bluerpint (#1064)
Browse files Browse the repository at this point in the history
* use fileMapTokens, add module-unification file, scss blueprint and update resolver

* exclude blueprints/module-unification.js from eslint

* add eslintrc.js config to blueprints

* remove blueprints/module-unification from excluded
  • Loading branch information
betocantu93 authored and miguelcobain committed Feb 22, 2019
1 parent 87b2e19 commit 395ec7b
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 2 deletions.
12 changes: 12 additions & 0 deletions blueprints/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 6
},
extends: [
'eslint:recommended'
],
env: {
node: true
}
};
20 changes: 19 additions & 1 deletion blueprints/ember-paper/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

const isModuleUnificationProject = require('../module-unification').isModuleUnificationProject;

module.exports = {
description: 'Installs ember-cli-sass',

Expand All @@ -9,7 +11,23 @@ module.exports = {
// to us
},

fileMapTokens() {
if (isModuleUnificationProject(this.project)) {
return {
__path__() {
return 'src/ui';
}
};
} else {
return {
__path__() {
return 'app';
}
};
}
},

afterInstall() {
return this.addAddonToProject('ember-cli-sass', '^7.2.0');
}
};
};
8 changes: 8 additions & 0 deletions blueprints/module-unification.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

'use strict';

module.exports = {
isModuleUnificationProject(project) {
return project && project.isModuleUnification && project.isModuleUnification();
}
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"matchmedia-polyfill": "^0.3.1",
"polyfill-nodelist-foreach": "^1.0.1",
"propagating-hammerjs": "^1.4.6",
"resolve": "^1.3.3",
"resolve": "^1.5.0",
"tinycolor2": "^1.4.1",
"virtual-each": "~0.6.0"
},
Expand Down

0 comments on commit 395ec7b

Please sign in to comment.