|
| 1 | +diff --git a/lib/ember-new.js b/lib/ember-new.js |
| 2 | +index a4ca3d1c8a22b685b5e65410b0959a8210e3770e..92f51bfe465621621bc9bd82fe4e8b881b0eb93b 100644 |
| 3 | +--- a/lib/ember-new.js |
| 4 | ++++ b/lib/ember-new.js |
| 5 | +@@ -18,7 +18,7 @@ const { |
| 6 | + * @param {String} [options.target='app'] the type of project to create (`app`, `addon` or `in-repo-addon`) |
| 7 | + * @returns {Promise} |
| 8 | + */ |
| 9 | +-module.exports = function(options) { |
| 10 | ++module.exports = function (options) { |
| 11 | + options = options || {}; |
| 12 | + |
| 13 | + let target = options.target || 'app'; |
| 14 | +@@ -27,13 +27,15 @@ module.exports = function(options) { |
| 15 | + let projectName = isAddon ? 'my-addon' : 'my-app'; |
| 16 | + let command = isAddon ? 'addon' : 'new'; |
| 17 | + |
| 18 | ++ let cliArgs = Array.isArray(options.cliArgs) ? options.cliArgs : []; |
| 19 | ++ |
| 20 | + let cliOptions = { |
| 21 | + disableDependencyChecker: true |
| 22 | + }; |
| 23 | + |
| 24 | + let originalENV = enableModuleUnification(options.isModuleUnification); |
| 25 | + |
| 26 | +- return ember([command, projectName, '--skip-npm', '--skip-bower'], cliOptions) |
| 27 | ++ return ember([command, projectName, '--skip-npm', '--skip-bower', ...cliArgs], cliOptions) |
| 28 | + .then(generateInRepoAddon(target)) |
| 29 | + .then(linkAddon) |
| 30 | + .catch(rethrowFromErrorLog) |
| 31 | +@@ -41,7 +43,7 @@ module.exports = function(options) { |
| 32 | + }; |
| 33 | + |
| 34 | + function generateInRepoAddon(target) { |
| 35 | +- return function() { |
| 36 | ++ return function () { |
| 37 | + if (target === 'in-repo-addon') { |
| 38 | + return ember(['generate', 'in-repo-addon', 'my-addon']) |
| 39 | + } |
0 commit comments