diff --git a/packages/angular-cli/commands/init.ts b/packages/angular-cli/commands/init.ts index 491192f90614..1b300e43b588 100644 --- a/packages/angular-cli/commands/init.ts +++ b/packages/angular-cli/commands/init.ts @@ -18,7 +18,6 @@ const InitCommand: any = Command.extend({ availableOptions: [ { name: 'dry-run', type: Boolean, default: false, aliases: ['d'] }, { name: 'verbose', type: Boolean, default: false, aliases: ['v'] }, - { name: 'blueprint', type: String, aliases: ['b'] }, { name: 'link-cli', type: Boolean, default: false, aliases: ['lc'] }, { name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] }, { name: 'skip-bower', type: Boolean, default: true, aliases: ['sb'] }, @@ -34,10 +33,6 @@ const InitCommand: any = Command.extend({ anonymousOptions: [''], - _defaultBlueprint: function () { - return 'ng2'; - }, - run: function (commandOptions: any, rawArgs: string[]) { if (commandOptions.dryRun) { commandOptions.skipNpm = true; @@ -100,7 +95,7 @@ const InitCommand: any = Command.extend({ const blueprintOpts = { dryRun: commandOptions.dryRun, - blueprint: commandOptions.blueprint || this._defaultBlueprint(), + blueprint: 'ng2', rawName: packageName, targetFiles: rawArgs || '', rawArgs: rawArgs.toString(), diff --git a/packages/angular-cli/commands/new.ts b/packages/angular-cli/commands/new.ts index 27fbbb9acfbc..5737c0afaee8 100644 --- a/packages/angular-cli/commands/new.ts +++ b/packages/angular-cli/commands/new.ts @@ -1,11 +1,11 @@ import * as chalk from 'chalk'; +import InitCommand from './init'; + const Command = require('ember-cli/lib/models/command'); const Project = require('ember-cli/lib/models/project'); const SilentError = require('silent-error'); const validProjectName = require('ember-cli/lib/utilities/valid-project-name'); -const normalizeBlueprint = require('ember-cli/lib/utilities/normalize-blueprint-option'); -import InitCommand from './init'; const NewCommand = Command.extend({ name: 'new', @@ -15,7 +15,6 @@ const NewCommand = Command.extend({ availableOptions: [ { name: 'dry-run', type: Boolean, default: false, aliases: ['d'] }, { name: 'verbose', type: Boolean, default: false, aliases: ['v'] }, - { name: 'blueprint', type: String, default: 'ng2', aliases: ['b'] }, { name: 'link-cli', type: Boolean, default: false, aliases: ['lc'] }, { name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] }, { name: 'skip-bower', type: Boolean, default: true, aliases: ['sb'] }, @@ -62,8 +61,6 @@ const NewCommand = Command.extend({ )); } - commandOptions.blueprint = normalizeBlueprint(commandOptions.blueprint); - if (!commandOptions.directory) { commandOptions.directory = packageName; } diff --git a/tests/acceptance/new.spec.js b/tests/acceptance/new.spec.js index 533f2893d97d..1cdcc640b214 100644 --- a/tests/acceptance/new.spec.js +++ b/tests/acceptance/new.spec.js @@ -103,42 +103,6 @@ describe('Acceptance: ng new', function () { .then(confirmBlueprinted); }); - it('ng new with blueprint uses the specified blueprint directory with a relative path', - function () { - return tmp.setup('./tmp/my_blueprint') - .then(function () { - return tmp.setup('./tmp/my_blueprint/files'); - }) - .then(function () { - fs.writeFileSync('./tmp/my_blueprint/files/gitignore'); - process.chdir('./tmp'); - - return ng([ - 'new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', - '--blueprint=./my_blueprint' - ]); - }) - .then(confirmBlueprintedForDir('tmp/my_blueprint')); - }); - - it('ng new with blueprint uses the specified blueprint directory with an absolute path', - function () { - return tmp.setup('./tmp/my_blueprint') - .then(function () { - return tmp.setup('./tmp/my_blueprint/files'); - }) - .then(function () { - fs.writeFileSync('./tmp/my_blueprint/files/gitignore'); - process.chdir('./tmp'); - - return ng([ - 'new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', - '--blueprint=' + path.resolve(process.cwd(), './my_blueprint') - ]); - }) - .then(confirmBlueprintedForDir('tmp/my_blueprint')); - }); - it('ng new without skip-git flag creates .git dir', function () { return ng(['new', 'foo', '--skip-npm', '--skip-bower']).then(function () { expect(existsSync('.git'));