File tree 4 files changed +12
-8
lines changed
4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import { SchematicAvailableOptions } from '../tasks/schematic-get-options';
17
17
const Command = require ( '../ember-cli/lib/models/command' ) ;
18
18
const SilentError = require ( 'silent-error' ) ;
19
19
20
- const { cyan, grey , yellow } = chalk ;
20
+ const { cyan, yellow } = chalk ;
21
21
const separatorRegEx = / [ \/ \\ ] / g;
22
22
23
23
@@ -199,7 +199,8 @@ export default Command.extend({
199
199
} ) ;
200
200
return getHelpOutputTask . run ( {
201
201
schematicName,
202
- collectionName
202
+ collectionName,
203
+ nonSchematicOptions : this . availableOptions . filter ( ( o : any ) => ! o . hidden )
203
204
} )
204
205
. then ( ( output : string [ ] ) => {
205
206
return [
Original file line number Diff line number Diff line change @@ -67,9 +67,7 @@ const HelpCommand = Command.extend({
67
67
if ( commandOptions . short ) {
68
68
this . ui . writeLine ( command . printShortHelp ( commandOptions ) ) ;
69
69
} else if ( command . printDetailedHelp ( commandOptions , rawArgs ) ) {
70
- this . ui . writeLine ( 'cool' ) ;
71
70
const result = command . printDetailedHelp ( commandOptions , rawArgs ) ;
72
- this . ui . writeLine ( 'not cool' , result ) ;
73
71
if ( result instanceof Promise ) {
74
72
result . then ( r => this . ui . writeLine ( r ) ) ;
75
73
} else {
Original file line number Diff line number Diff line change @@ -3,13 +3,11 @@ import * as path from 'path';
3
3
import chalk from 'chalk' ;
4
4
5
5
import { CliConfig } from '../models/config' ;
6
- import { getCollection , getEngineHost } from '../utilities/schematics' ;
7
6
import { validateProjectName } from '../utilities/validate-project-name' ;
8
7
import { oneLine } from 'common-tags' ;
9
8
import { SchematicAvailableOptions } from '../tasks/schematic-get-options' ;
10
- import { outputFile } from 'fs-extra' ;
11
9
12
- const { cyan, yellow } = chalk ;
10
+ const { cyan } = chalk ;
13
11
14
12
const Command = require ( '../ember-cli/lib/models/command' ) ;
15
13
const SilentError = require ( 'silent-error' ) ;
Original file line number Diff line number Diff line change @@ -18,6 +18,13 @@ export interface SchematicAvailableOptions {
18
18
schematicDefault : any ;
19
19
}
20
20
21
+ const hiddenOptions = [
22
+ 'name' ,
23
+ 'path' ,
24
+ 'source-dir' ,
25
+ 'app-root'
26
+ ] ;
27
+
21
28
export default Task . extend ( {
22
29
run : function ( { schematicName, collectionName, nonSchematicOptions} : SchematicGetHelpOptions ) :
23
30
Promise < string [ ] > {
@@ -34,7 +41,7 @@ export default Task.extend({
34
41
. then ( ( [ availableOptions , nonSchematicOptions ] : [ SchematicAvailableOptions [ ] , any [ ] ] ) => {
35
42
const output : string [ ] = [ ] ;
36
43
[ ...( nonSchematicOptions || [ ] ) , ...availableOptions ]
37
- . filter ( opt => opt . name !== 'name' )
44
+ . filter ( opt => hiddenOptions . indexOf ( opt . name ) === - 1 )
38
45
. forEach ( opt => {
39
46
let text = cyan ( ` --${ opt . name } ` ) ;
40
47
if ( opt . schematicType ) {
You can’t perform that action at this time.
0 commit comments