Skip to content

Commit 132fe4e

Browse files
committed
Fixed link to generate task, removed npm and git tasks
1 parent 1773c5d commit 132fe4e

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

packages/angular-cli/commands/generate-lib-module.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,13 @@ const LibModuleCommand: any = Command.extend({
3434
anonymousOptions: ['<glob-pattern>'],
3535

3636
run: function (commandOptions: any, rawArgs: string[]) {
37-
const packageName = rawArgs.shift();
38-
39-
if (!packageName) {
37+
if (!commandOptions.name) {
4038
return Promise.reject(new SilentError(
4139
`The "ng ${this.name}" command requires a name argument to be specified. ` +
4240
`For more details, use "ng help".`));
4341
}
4442

45-
commandOptions.name = packageName;
46-
commandOptions.directory = packageName;
43+
commandOptions.directory = commandOptions.name;
4744

4845
if (commandOptions.dryRun) {
4946
commandOptions.skipGit = true;
@@ -99,7 +96,7 @@ const LibModuleCommand: any = Command.extend({
9996

10097
const project = this.project;
10198

102-
if (!packageName) {
99+
if (!commandOptions.name) {
103100
const message = 'The `ng ' + this.name + '` command requires a ' +
104101
'package.json in current folder with name attribute or a specified name via arguments. ' +
105102
'For more details, use `ng help`.';
@@ -110,7 +107,7 @@ const LibModuleCommand: any = Command.extend({
110107
const blueprintOpts = {
111108
dryRun: commandOptions.dryRun,
112109
blueprint: 'libmodule',
113-
rawName: packageName,
110+
rawName: commandOptions.name,
114111
targetFiles: rawArgs || '',
115112
rawArgs: rawArgs.toString(),
116113
sourceDir: commandOptions.sourceDir,
@@ -123,9 +120,9 @@ const LibModuleCommand: any = Command.extend({
123120
ignoredUpdateFiles: ['favicon.ico']
124121
};
125122

126-
if (!validProjectName(packageName)) {
123+
if (!validProjectName(commandOptions.name)) {
127124
return Promise.reject(
128-
new SilentError('We currently do not support a name of `' + packageName + '`.'));
125+
new SilentError('We currently do not support a name of `' + commandOptions.name + '`.'));
129126
}
130127

131128
if (commandOptions.mobile) {

packages/angular-cli/commands/new-module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as chalk from 'chalk';
2-
import InitCommand from './init';
2+
import InitCommand from './generate-lib-module';
33

44
const Command = require('../ember-cli/lib/models/command');
55
const Project = require('../ember-cli/lib/models/project');
@@ -18,7 +18,7 @@ const NewModuleCommand = Command.extend({
1818
{ name: 'link-cli', type: Boolean, default: false, aliases: ['lc'] },
1919
{ name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] },
2020
{ name: 'skip-bower', type: Boolean, default: true, aliases: ['sb'] },
21-
{ name: 'skip-git', type: Boolean, default: false, aliases: ['sg'] },
21+
{ name: 'skip-git', type: Boolean, default: true, aliases: ['sg'] },
2222
{ name: 'directory', type: String, aliases: ['dir'] },
2323
{ name: 'source-dir', type: String, default: 'src', aliases: ['sd'] },
2424
{ name: 'style', type: String, default: 'css' },

0 commit comments

Comments
 (0)