diff --git a/blueprints/-addon-import.js b/blueprints/-addon-import.js index 3c7900eee17..ed89ae9891d 100644 --- a/blueprints/-addon-import.js +++ b/blueprints/-addon-import.js @@ -10,15 +10,9 @@ module.exports = { fileMapTokens: function() { return { __name__: function(options) { - if (options.pod && options.hasPathToken) { - return options.locals.blueprintName; - } return options.dasherizedModuleName; }, __path__: function(options) { - if (options.pod && options.hasPathToken) { - return path.join(options.podPath, options.dasherizedModuleName); - } return inflector.pluralize(options.locals.blueprintName); }, __root__: function(options) { @@ -42,10 +36,6 @@ module.exports = { modulePathSegments = [addonName, inflector.pluralize(blueprintName), fileName]; } - if (options.pod) { - modulePathSegments = [addonName, fileName, blueprintName]; - } - return { modulePath: modulePathSegments.join('/'), blueprintName: blueprintName diff --git a/node-tests/blueprints/helper-addon-test.js b/node-tests/blueprints/helper-addon-test.js index 3a7a0652e40..b74a6319b87 100644 --- a/node-tests/blueprints/helper-addon-test.js +++ b/node-tests/blueprints/helper-addon-test.js @@ -24,5 +24,12 @@ describe('Blueprint: helper-addon', function() { .to.equal(fixture('helper-addon.js')); }); }); + + it('helper-addon foo/bar-baz --pod', function() { + return emberGenerateDestroy(['helper-addon', 'foo/bar-baz', '--pod'], _file => { + expect(_file('app/helpers/foo/bar-baz.js')) + .to.equal(fixture('helper-addon.js')); + }); + }); }); }); diff --git a/node-tests/blueprints/initializer-addon-test.js b/node-tests/blueprints/initializer-addon-test.js index 11cd2df18ab..c6816cc6450 100644 --- a/node-tests/blueprints/initializer-addon-test.js +++ b/node-tests/blueprints/initializer-addon-test.js @@ -22,5 +22,12 @@ describe('Blueprint: initializer-addon', function() { .to.contain("export { default, initialize } from 'my-addon/initializers/foo';"); }); }); + + it('initializer-addon foo --pod', function() { + return emberGenerateDestroy(['initializer-addon', 'foo', '--pod'], _file => { + expect(_file('app/initializers/foo.js')) + .to.contain("export { default, initialize } from 'my-addon/initializers/foo';"); + }); + }); }); }); diff --git a/node-tests/blueprints/instance-initializer-addon-test.js b/node-tests/blueprints/instance-initializer-addon-test.js index 538f9a0b0d4..7df68363b6c 100644 --- a/node-tests/blueprints/instance-initializer-addon-test.js +++ b/node-tests/blueprints/instance-initializer-addon-test.js @@ -22,5 +22,12 @@ describe('Blueprint: instance-initializer-addon', function() { .to.contain("export { default, initialize } from 'my-addon/instance-initializers/foo';"); }); }); + + it('instance-initializer-addon foo --pod', function() { + return emberGenerateDestroy(['instance-initializer-addon', 'foo', '--pod'], _file => { + expect(_file('app/instance-initializers/foo.js')) + .to.contain("export { default, initialize } from 'my-addon/instance-initializers/foo';"); + }); + }); }); });