Skip to content

Commit

Permalink
排版
Browse files Browse the repository at this point in the history
  • Loading branch information
walkerwzy committed Sep 18, 2017
1 parent ca31540 commit b39eb5e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion templates/httpclient/task.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import <PMRESTLib/PMRESTLib.h>
${endpoints.map(m=>
`#import "${m.model}";
`#import "${m.model}.h"
`).join('')}

@interface ${modulename} : PMLRESTBaseHD
Expand Down
11 changes: 7 additions & 4 deletions templates/httpclient/task.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ @implementation ${modulename}
PMTASK_INIT_SINGLETON

+ (NSDictionary<NSString *,id> *)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`
2 changes: 1 addition & 1 deletion templates/model/template.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import <PMRESTLib/PMRESTLib.h>
${model.props.filter(m=>m.model).map(prop =>
`#import ${prop.model}.h
`#import "${prop.model}.h"
`).join('')}

@interface ${model.className} : ${model.baseName}
Expand Down
2 changes: 1 addition & 1 deletion templates/model/template.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © ${(new Date()).getFullYear()} ${copyright} All rights reserved.
//

#import ${model.className}.h
#import "${model.className}.h"

@implementation ${model.className}

Expand Down
2 changes: 1 addition & 1 deletion templates/model/templatebase.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © ${(new Date()).getFullYear()} ${copyright} All rights reserved.
//

#import ${model.className}.h
#import "${model.className}.h"

@implementation ${model.className}

Expand Down

0 comments on commit b39eb5e

Please sign in to comment.