index.ts 754 B

12345678910111213141516171819
  1. import { listDirectoryFiles } from '@adonisjs/core/build/standalone'
  2. import Application from '@ioc:Adonis/Core/Application'
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Exporting an array of commands
  6. |--------------------------------------------------------------------------
  7. |
  8. | Instead of manually exporting each file from this directory, we use the
  9. | helper `listDirectoryFiles` to recursively collect and export an array
  10. | of filenames.
  11. |
  12. | Couple of things to note:
  13. |
  14. | 1. The file path must be relative from the project root and not this directory.
  15. | 2. We must ignore this file to avoid getting into an infinite loop
  16. |
  17. */
  18. export default listDirectoryFiles(__dirname, Application.appRoot, ['./commands/index'])