-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Respect contracts directory defined in adonisjrc.json #81
Conversation
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
ping @thetutlage |
@@ -126,7 +126,8 @@ export default async function instructions( | |||
/** | |||
* Create the mail contracts file | |||
*/ | |||
const contractsPath = app.makePath('contracts/mail.ts') | |||
const contractsDir = app.directoriesMap.get('contracts') || 'contracts' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use path.join
instead?
const contractsDir = app.directoriesMap.get('contracts') || 'contracts' | |
const contractsDirectory = app.directoriesMap.get('contracts') || 'contracts' | |
const contractPath = join(contractsDirectory, 'mail.ts') |
@@ -141,7 +142,7 @@ export default async function instructions( | |||
sparkpost: mailDrivers.includes('sparkpost'), | |||
}) | |||
.commit() | |||
sink.logger.action('create').succeeded('contracts/mail.ts') | |||
sink.logger.action('create').succeeded(`${contractsDir}/mail.ts`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sink.logger.action('create').succeeded(`${contractsDir}/mail.ts`) | |
sink.logger.action('create').succeeded(contractPath) |
Co-authored-by: Romain Lanz <2793951+RomainLanz@users.noreply.github.com>
Co-authored-by: Romain Lanz <2793951+RomainLanz@users.noreply.github.com>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@TiBianMod Thanks for the PR and sorry for taking that long :) |
@thetutlage no problem mate 😄 |
The
node ace configure @adonisjs/mail
ignores the definedcontracts
directory from the user inside.adonisjrc.json
This PR will respect the
contracts
directory defined by the user inside.adonisjrc.json
and will fallback to default if not present.Types of changes
Checklist
Further comments
@thetutlage point me to right direction for adding tests if necessary.
I can't find related tests for
node ace configure @adonisjs/mail