@@ -40,8 +40,11 @@ export default function (plop: NodePlopAPI) {
4040 description : 'Generate an API service' ,
4141 prompts : [
4242 process . env . NO_DIR_WARNING ? undefined : Prompts . dirWarning ,
43- Prompts . email , Prompts . fullname , Prompts . org ,
44- Prompts . name , Prompts . desc ,
43+ Prompts . email ,
44+ Prompts . fullname ,
45+ Prompts . org ,
46+ Prompts . name ,
47+ Prompts . desc ,
4548 Prompts . features ,
4649 Prompts . dbName ,
4750 ] . filter ( ( p ) => ! ! p ) as PromptQuestion [ ] ,
@@ -54,9 +57,7 @@ export default function (plop: NodePlopAPI) {
5457 stripExtensions : [ 'hbs' ] ,
5558 globOptions : { dot : true } ,
5659 force : true ,
57- templateFiles : [
58- path . resolve ( __dirname , '../templates/all/**' ) ,
59- ] ,
60+ templateFiles : [ path . resolve ( __dirname , '../templates/all/**' ) ] ,
6061 data : {
6162 dependencies : dependencies ( data as OtiAnswers ) ,
6263 devDependencies : devDependencies ( data as OtiAnswers ) ,
@@ -75,9 +76,7 @@ export default function (plop: NodePlopAPI) {
7576 stripExtensions : [ 'hbs' ] ,
7677 globOptions : { dot : true } ,
7778 force : true ,
78- templateFiles : [
79- path . resolve ( __dirname , '../templates/db/**' ) ,
80- ] ,
79+ templateFiles : [ path . resolve ( __dirname , '../templates/db/**' ) ] ,
8180 } ,
8281 cli ( 'yarn set version berry' ) ,
8382 cli ( 'yarn config set nodeLinker node-modules' ) ,
@@ -95,14 +94,18 @@ export default function (plop: NodePlopAPI) {
9594Your project is ready to roll! We ran yarn for you, so your next steps are:
9695* Go into the api directory and edit your API specification.
9796 You could use https://editor.swagger.io/ and then paste the yaml back in.
98- ${ data ?. features . includes ( 'db' ) ? `* Go into migrations/sql and add your initial database up/down migration to the existing files
99- * Run "make db-ci" to create the database and run the migrations.` : '' }
97+ ${
98+ data ?. features . includes ( 'db' )
99+ ? `* Go into migrations/sql and add your initial database up/down migration to the existing files
100+ * Run "make db-ci" to create the database and run the migrations.`
101+ : ''
102+ }
100103* Run "yarn test" to just make sure the environment is all sorted out.
101104* Run "yarn build" to build the database interface, service types and TS code.
102105* Start implementing your API by adding appropriate handler methods.
103106
104107Happy hacking!` ,
105- ] . filter ( a => typeof a === 'object' || typeof a === 'string' ) ;
108+ ] . filter ( ( a ) => typeof a === 'object' || typeof a === 'string' ) ;
106109 } ,
107110 } ) ;
108111}
0 commit comments