File tree Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Expand file tree Collapse file tree 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';
1717const Command = require ( '../ember-cli/lib/models/command' ) ;
1818const SilentError = require ( 'silent-error' ) ;
1919
20- const { cyan, grey , yellow } = chalk ;
20+ const { cyan, yellow } = chalk ;
2121const separatorRegEx = / [ \/ \\ ] / g;
2222
2323
@@ -199,7 +199,8 @@ export default Command.extend({
199199 } ) ;
200200 return getHelpOutputTask . run ( {
201201 schematicName,
202- collectionName
202+ collectionName,
203+ nonSchematicOptions : this . availableOptions . filter ( ( o : any ) => ! o . hidden )
203204 } )
204205 . then ( ( output : string [ ] ) => {
205206 return [
Original file line number Diff line number Diff line change @@ -67,9 +67,7 @@ const HelpCommand = Command.extend({
6767 if ( commandOptions . short ) {
6868 this . ui . writeLine ( command . printShortHelp ( commandOptions ) ) ;
6969 } else if ( command . printDetailedHelp ( commandOptions , rawArgs ) ) {
70- this . ui . writeLine ( 'cool' ) ;
7170 const result = command . printDetailedHelp ( commandOptions , rawArgs ) ;
72- this . ui . writeLine ( 'not cool' , result ) ;
7371 if ( result instanceof Promise ) {
7472 result . then ( r => this . ui . writeLine ( r ) ) ;
7573 } else {
Original file line number Diff line number Diff line change @@ -3,13 +3,11 @@ import * as path from 'path';
33import chalk from 'chalk' ;
44
55import { CliConfig } from '../models/config' ;
6- import { getCollection , getEngineHost } from '../utilities/schematics' ;
76import { validateProjectName } from '../utilities/validate-project-name' ;
87import { oneLine } from 'common-tags' ;
98import { SchematicAvailableOptions } from '../tasks/schematic-get-options' ;
10- import { outputFile } from 'fs-extra' ;
119
12- const { cyan, yellow } = chalk ;
10+ const { cyan } = chalk ;
1311
1412const Command = require ( '../ember-cli/lib/models/command' ) ;
1513const SilentError = require ( 'silent-error' ) ;
Original file line number Diff line number Diff line change @@ -18,6 +18,13 @@ export interface SchematicAvailableOptions {
1818 schematicDefault : any ;
1919}
2020
21+ const hiddenOptions = [
22+ 'name' ,
23+ 'path' ,
24+ 'source-dir' ,
25+ 'app-root'
26+ ] ;
27+
2128export default Task . extend ( {
2229 run : function ( { schematicName, collectionName, nonSchematicOptions} : SchematicGetHelpOptions ) :
2330 Promise < string [ ] > {
@@ -34,7 +41,7 @@ export default Task.extend({
3441 . then ( ( [ availableOptions , nonSchematicOptions ] : [ SchematicAvailableOptions [ ] , any [ ] ] ) => {
3542 const output : string [ ] = [ ] ;
3643 [ ...( nonSchematicOptions || [ ] ) , ...availableOptions ]
37- . filter ( opt => opt . name !== 'name' )
44+ . filter ( opt => hiddenOptions . indexOf ( opt . name ) === - 1 )
3845 . forEach ( opt => {
3946 let text = cyan ( ` --${ opt . name } ` ) ;
4047 if ( opt . schematicType ) {
You can’t perform that action at this time.
0 commit comments