Skip to content

Commit

Permalink
Merge pull request #1052 from alibaba/modeify-init-templates-function…
Browse files Browse the repository at this point in the history
…-name-to-project-name

replace function name in init templates with {{ projectName }}
  • Loading branch information
rsonghuster authored Dec 2, 2020
2 parents 05875b6 + 24f8c44 commit bae5304
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions templates/custom-cpp/{{ projectName }}/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ Resources:
Type: 'Aliyun::Serverless::Service'
Properties:
Description: 'helloworld'
fc_cpp_event:
{{ projectName }}_event:
Type: 'Aliyun::Serverless::Function'
Properties:
Handler: event.handler
Runtime: custom
MemorySize: 512
CodeUri: './bin'
fc_cpp_http:
{{ projectName }}_http:
Type: 'Aliyun::Serverless::Function'
Properties:
Handler: http.handler
Expand All @@ -34,4 +34,4 @@ Resources:
Routes:
'/*':
ServiceName: {{ service }}
FunctionName: fc_cpp_http
FunctionName: {{ projectName }}_http
2 changes: 1 addition & 1 deletion templates/custom-dart/{{ projectName }}/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Resources:
Type: 'Aliyun::Serverless::Service'
Properties:
InternetAccess: true
dart-func:
{{ projectName }}:
Type: 'Aliyun::Serverless::Function'
Properties:
Handler: index.handler
Expand Down
4 changes: 2 additions & 2 deletions templates/custom-fsharp/{{ projectName }}/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Resources:
Type: 'Aliyun::Serverless::Service'
Properties:
Description: 'helloworld'
fc_fsharp:
{{ projectName }}:
Type: 'Aliyun::Serverless::Function'
Properties:
Handler: Program.main
Expand All @@ -27,4 +27,4 @@ Resources:
Routes:
'/*':
ServiceName: {{ service }}
FunctionName: fc_fsharp
FunctionName: {{ projectName }}
2 changes: 1 addition & 1 deletion templates/custom-lua/{{ projectName }}/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Resources:
Type: 'Aliyun::Serverless::Service'
Properties:
Description: 'helloworld'
fc-lua:
{{ projectName }}:
Type: 'Aliyun::Serverless::Function'
Properties:
Handler: index.handler
Expand Down
2 changes: 1 addition & 1 deletion templates/custom-powershell/{{ projectName }}/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Resources:
Type: 'Aliyun::Serverless::Service'
Properties:
Description: helloworld
fc-powershell:
{{ projectName }}:
Type: 'Aliyun::Serverless::Function'
Properties:
Handler: index.handler
Expand Down
2 changes: 1 addition & 1 deletion templates/custom-ruby/{{ projectName }}/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Resources:
Type: 'Aliyun::Serverless::Service'
Properties:
Description: 'helloworld'
fc-ruby:
{{ projectName }}:
Type: 'Aliyun::Serverless::Function'
Properties:
Handler: index.handler
Expand Down
2 changes: 1 addition & 1 deletion templates/custom-rust/{{ projectName }}/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Resources:
Type: 'Aliyun::Serverless::Service'
Properties:
Description: 'A demo service of how to use Rust in FC.'
fc-rust:
{{ projectName }}:
Type: 'Aliyun::Serverless::Function'
Properties:
Runtime: custom
Expand Down
4 changes: 2 additions & 2 deletions templates/custom-springboot/{{ projectName }}/template.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
ROSTemplateFormatVersion: '2015-09-01'
Transform: 'Aliyun::Serverless-2018-04-03'
Resources:
springboot: # service name
{{ service }}: # service name
Type: 'Aliyun::Serverless::Service'
Properties:
Description: This is a FC service for springboot
helloworld: # function name
{{ projectName }}: # function name
Type: 'Aliyun::Serverless::Function'
Properties:
Handler: com.example.demo.DemoApplication::main
Expand Down
2 changes: 1 addition & 1 deletion templates/custom-typescript/{{ projectName }}/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Resources:
Type: 'Aliyun::Serverless::Service'
Properties:
Description: 'helloworld'
fc-ts:
{{ projectName }}:
Type: 'Aliyun::Serverless::Function'
Properties:
Handler: index.handler
Expand Down

0 comments on commit bae5304

Please sign in to comment.