Skip to content

Commit a64f5e4

Browse files
committed
feat: rename Services to services and add server binary
1 parent 8c12448 commit a64f5e4

File tree

8 files changed

+38
-19
lines changed

8 files changed

+38
-19
lines changed

src/SDK/Language/CLI.php

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,8 @@ public function getFiles()
174174
],
175175
[
176176
'scope' => 'default',
177-
'destination' => '/install.sh',
178-
'template' => '/cli/install.sh.twig',
179-
'minify' => false,
180-
],
181-
[
182-
'scope' => 'default',
183-
'destination' => '/install.ps1',
184-
'template' => '/cli/install.ps1.twig',
177+
'destination' => '/bin/server',
178+
'template' => '/cli/bin/server.twig',
185179
'minify' => false,
186180
],
187181
[
@@ -204,25 +198,31 @@ public function getFiles()
204198
],
205199
[
206200
'scope' => 'service',
207-
'destination' => '/app/{{ spec.title | caseUcfirst}}/Services/{{service.name | caseDash}}.php',
201+
'destination' => '/app/{{ spec.title | caseUcfirst}}/services/{{service.name | caseDash}}.php',
208202
'template' => '/cli/app/services/service.php.twig',
209203
'minify' => false,
210204
],
211205
[
212206
'scope' => 'default',
213-
'destination' => 'app/{{ spec.title | caseUcfirst}}/Services/client.php',
207+
'destination' => 'app/{{ spec.title | caseUcfirst}}/services/client.php',
214208
'template' => '/cli/app/services/client.php.twig',
215209
'minify' => false,
216210
],
217211
[
218212
'scope' => 'default',
219-
'destination' => 'app/{{ spec.title | caseUcfirst}}/Services/help.php',
213+
'destination' => 'app/{{ spec.title | caseUcfirst}}/services/server.php',
214+
'template' => '/cli/app/services/server.php.twig',
215+
'minify' => false,
216+
],
217+
[
218+
'scope' => 'default',
219+
'destination' => 'app/{{ spec.title | caseUcfirst}}/services/help.php',
220220
'template' => '/cli/app/services/help.php.twig',
221221
'minify' => false,
222222
],
223223
[
224224
'scope' => 'default',
225-
'destination' => 'app/{{ spec.title | caseUcfirst}}/Services/init.php',
225+
'destination' => 'app/{{ spec.title | caseUcfirst}}/services/init.php',
226226
'template' => '/cli/app/services/init.php.twig',
227227
'minify' => false,
228228
],
@@ -232,6 +232,18 @@ public function getFiles()
232232
'template' => '/cli/.travis.yml.twig',
233233
'minify' => false,
234234
],
235+
[
236+
'scope' => 'default',
237+
'destination' => '/install.sh',
238+
'template' => '/cli/install.sh.twig',
239+
'minify' => false,
240+
],
241+
[
242+
'scope' => 'default',
243+
'destination' => '/install.ps1',
244+
'template' => '/cli/install.ps1.twig',
245+
'minify' => false,
246+
],
235247
];
236248
}
237249

templates/cli/app/services/server.php.twig

Whitespace-only changes.

templates/cli/bin/client.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
if [[ $# -eq 0 ]]; then
4-
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/Services/client.php help
4+
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/client.php help
55
else
6-
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/Services/client.php $@
6+
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/client.php $@
77
fi

templates/cli/bin/help.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22

3-
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/Services/help.php $@
3+
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/help.php $@

templates/cli/bin/init.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22

3-
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/Services/init.php init $@
3+
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/init.php init $@

templates/cli/bin/server.twig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
if [[ $# -eq 0 ]]; then
4+
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/server.php help
5+
else
6+
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/server.php $@
7+
fi

templates/cli/bin/service.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
if [[ $# -eq 0 ]]; then
4-
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/Services/{{service.name | caseDash}}.php help
4+
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/{{service.name | caseDash}}.php help
55
else
6-
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/Services/{{service.name | caseDash}}.php $@
6+
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/{{service.name | caseDash}}.php $@
77
fi

templates/cli/bin/version.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22

3-
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/Services/client.php version
3+
php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/client.php version

0 commit comments

Comments
 (0)