Skip to content

Commit 464a395

Browse files
authored
Merge pull request #21 from formidablejs/feature/config-clean-up
Feature/config clean up
2 parents 5672235 + f029d3a commit 464a395

File tree

3 files changed

+16
-19
lines changed

3 files changed

+16
-19
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- [ ] New feature (non-breaking change which adds functionality)
2525
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
2626
- [ ] This change requires a documentation update
27+
- [ ] Maintenance task (non-breaking & no new features)
2728

2829
## Checklist:
2930

formidable/config.imba

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { helpers } from '@formidablejs/framework'
2-
31
export default {
42
# --------------------------------------------------------------------------
53
# Default Mailer
@@ -20,11 +18,11 @@ export default {
2018
mailers: {
2119
smtp: {
2220
transport: 'smtp'
23-
host: helpers.env 'MAIL_HOST', 'smtp.mailgun.org'
24-
port: helpers.env 'MAIL_PORT', 587
25-
secure: helpers.env 'MAIL_SECURE', true
26-
username: helpers.env 'MAIL_USERNAME'
27-
password: helpers.env 'MAIL_PASSWORD'
21+
host: env 'MAIL_HOST', 'smtp.mailgun.org'
22+
port: env 'MAIL_PORT', 587
23+
secure: env 'MAIL_SECURE', true
24+
username: env 'MAIL_USERNAME'
25+
password: env 'MAIL_PASSWORD'
2826
}
2927

3028
sendmail: {
@@ -41,7 +39,7 @@ export default {
4139
# The email address that will be used in the "From" field of all emails.
4240

4341
from: {
44-
address: helpers.env 'MAIL_FROM_ADDRESS', 'hello@example.com'
45-
name: helpers.env 'MAIL_FROM_NAME', 'Example'
42+
address: env 'MAIL_FROM_ADDRESS', 'hello@example.com'
43+
name: env 'MAIL_FROM_NAME', 'Example'
4644
}
4745
}

formidable/config.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { helpers } from '@formidablejs/framework';
2-
31
export default {
42
/**
53
* --------------------------------------------------------------------------
@@ -24,11 +22,11 @@ export default {
2422
mailers: {
2523
smtp: {
2624
transport: 'smtp',
27-
host: helpers.env('MAIL_HOST', 'smtp.mailgun.org'),
28-
port: helpers.env('MAIL_PORT', 587),
29-
secure: helpers.env('MAIL_SECURE', true),
30-
username: helpers.env('MAIL_USERNAME'),
31-
password: helpers.env('MAIL_PASSWORD')
25+
host: env('MAIL_HOST', 'smtp.mailgun.org'),
26+
port: env('MAIL_PORT', 587),
27+
secure: env('MAIL_SECURE', true),
28+
username: env('MAIL_USERNAME'),
29+
password: env('MAIL_PASSWORD')
3230
},
3331

3432
sendmail: {
@@ -47,7 +45,7 @@ export default {
4745
*/
4846

4947
from: {
50-
address: helpers.env('MAIL_FROM_ADDRESS', 'hello@example.com'),
51-
name: helpers.env('MAIL_FROM_NAME', 'Example')
48+
address: env('MAIL_FROM_ADDRESS', 'hello@example.com'),
49+
name: env('MAIL_FROM_NAME', 'Example')
5250
}
53-
}
51+
}

0 commit comments

Comments
 (0)