From b39eb5e2dba6d4679064f86c095eb7f605b2bbea Mon Sep 17 00:00:00 2001 From: walker Date: Mon, 18 Sep 2017 09:29:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/httpclient/task.h | 2 +- templates/httpclient/task.m | 11 +++++++---- templates/model/template.h | 2 +- templates/model/template.m | 2 +- templates/model/templatebase.m | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/templates/httpclient/task.h b/templates/httpclient/task.h index f6a4686..ac8891a 100644 --- a/templates/httpclient/task.h +++ b/templates/httpclient/task.h @@ -8,7 +8,7 @@ #import ${endpoints.map(m=> -`#import "${m.model}"; +`#import "${m.model}.h" `).join('')} @interface ${modulename} : PMLRESTBaseHD diff --git a/templates/httpclient/task.m b/templates/httpclient/task.m index 7d9e942..800f69e 100644 --- a/templates/httpclient/task.m +++ b/templates/httpclient/task.m @@ -15,12 +15,15 @@ @implementation ${modulename} PMTASK_INIT_SINGLETON + (NSDictionary *)modelClassesByResourcePath { - return @{${endpoints.map(e=>` - kEndpoint${e.method}: [${e.model} class],`).join('').slice(0,-1)} + return @{ + ${endpoints.map(e=> + `kEndpoint${e.method}: [${e.model} class],` + ).join('').slice(0,-1)} }; } -${endpoints.map(e=>` -PMTASK_EXPORT_IMP(${e.method}, ${e.model})`).join('')} +${endpoints.map(e=> +`PMTASK_EXPORT_IMP(${e.method}, ${e.model})` +).join('')} @end` diff --git a/templates/model/template.h b/templates/model/template.h index baae2d3..ad48ebe 100644 --- a/templates/model/template.h +++ b/templates/model/template.h @@ -8,7 +8,7 @@ #import ${model.props.filter(m=>m.model).map(prop => -`#import ${prop.model}.h +`#import "${prop.model}.h" `).join('')} @interface ${model.className} : ${model.baseName} diff --git a/templates/model/template.m b/templates/model/template.m index cc9ca07..aa7fac0 100644 --- a/templates/model/template.m +++ b/templates/model/template.m @@ -6,7 +6,7 @@ // Copyright © ${(new Date()).getFullYear()} ${copyright} All rights reserved. // -#import ${model.className}.h +#import "${model.className}.h" @implementation ${model.className} diff --git a/templates/model/templatebase.m b/templates/model/templatebase.m index 8a2cdba..8fd3f20 100644 --- a/templates/model/templatebase.m +++ b/templates/model/templatebase.m @@ -6,7 +6,7 @@ // Copyright © ${(new Date()).getFullYear()} ${copyright} All rights reserved. // -#import ${model.className}.h +#import "${model.className}.h" @implementation ${model.className}