File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import * as url from 'url';
4
4
import Helpers from 'handlebars-helpers' ;
5
5
import type { HelperDelegate } from 'handlebars' ;
6
6
import type { NodePlopAPI } from 'plop' ;
7
+ import type { PromptQuestion } from 'node-plop' ;
7
8
8
9
import { Prompts } from './prompts.js' ;
9
10
import type { OtiAnswers } from './prompts.js' ;
@@ -38,12 +39,12 @@ export default function (plop: NodePlopAPI) {
38
39
plop . setGenerator ( 'api' , {
39
40
description : 'Generate an API service' ,
40
41
prompts : [
41
- Prompts . dirWarning ,
42
+ process . env . NO_DIR_WARNING ? undefined : Prompts . dirWarning ,
42
43
Prompts . email , Prompts . fullname , Prompts . org ,
43
44
Prompts . name , Prompts . desc ,
44
45
Prompts . features ,
45
46
Prompts . dbName ,
46
- ] ,
47
+ ] . filter ( ( p ) => ! ! p ) as PromptQuestion [ ] ,
47
48
actions ( data ) {
48
49
return [
49
50
{
You can’t perform that action at this time.
0 commit comments