Skip to content

Commit

Permalink
Merge pull request #452 from ember-cli/remove-mu
Browse files Browse the repository at this point in the history
Remove dead module unification code
  • Loading branch information
stefanpenner committed Nov 19, 2019
2 parents 711e7db + dc0e79c commit 2444087
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 1,719 deletions.
42 changes: 0 additions & 42 deletions index.js
@@ -1,8 +1,6 @@
'use strict';

const VersionChecker = require('ember-cli-version-checker');
const path = require('path');
let isModuleUnification;

module.exports = {
name: require('./package.json').name,
Expand All @@ -24,7 +22,6 @@ module.exports = {
}
}
this._emberResolverFeatureFlags = this.emberResolverFeatureFlags();
isModuleUnification = !!this.project.isModuleUnification && this.project.isModuleUnification();

this.options.babel = {
loose: true,
Expand All @@ -47,45 +44,6 @@ module.exports = {
};
},

treeForAddon() {
const MergeTrees = require('broccoli-merge-trees');
const addonTrees = [].concat(
this._super.treeForAddon.apply(this, arguments),
isModuleUnification && this._moduleUnificationTrees()
).filter(Boolean);

return new MergeTrees(addonTrees);
},

_moduleUnificationTrees() {
const resolve = require('resolve');
const Funnel = require('broccoli-funnel');

let featureTreePath = path.join(this.root, 'mu-trees/addon');
let featureTree = new Funnel(featureTreePath, {
destDir: 'ember-resolver'
});

const glimmerResolverSrc = require.resolve('@glimmer/resolver/package');
let glimmerResolverPath = path.dirname(glimmerResolverSrc);
let glimmerResolverTree = new Funnel(glimmerResolverPath, {
srcDir: 'dist/modules/es2017',
destDir: '@glimmer/resolver'
});

let glimmerDISrc = resolve.sync('@glimmer/di', { basedir: glimmerResolverPath });
let glimmerDITree = new Funnel(path.join(glimmerDISrc, '../../../..'), {
srcDir: 'dist/modules/es2017',
destDir: '@glimmer/di'
});

return [
this.preprocessJs(featureTree, { registry: this.registry }),
this.preprocessJs(glimmerResolverTree, { registry: this.registry }),
this.preprocessJs(glimmerDITree, { registry: this.registry }),
];
},

included() {
this._super.included.apply(this, arguments);

Expand Down
115 changes: 0 additions & 115 deletions mu-trees/addon/ember-config.js

This file was deleted.

94 changes: 0 additions & 94 deletions mu-trees/addon/module-registries/requirejs.js

This file was deleted.

16 changes: 0 additions & 16 deletions mu-trees/addon/resolvers/fallback/index.js

This file was deleted.

0 comments on commit 2444087

Please sign in to comment.