Create a new RcFileTransformer instance
The current working directory URL
The TsMorph project instance
Add a new command to the rcFile
The path to the command file
This RcFileTransformer instance for method chaining
Add a new preloaded file to the rcFile
The path to the preload file
Optionalenvironments: ("test" | "web" | "console" | "repl")[]Optional array of environments where this preload should run
This RcFileTransformer instance for method chaining
Add a new provider to the rcFile
The path to the provider file
Optionalenvironments: ("test" | "web" | "console" | "repl")[]Optional array of environments where this provider should run
This RcFileTransformer instance for method chaining
Add a new meta file to the rcFile
The glob pattern for the meta file
Whether the server should reload when this file changes
This RcFileTransformer instance for method chaining
Set directory name and path in the directories configuration
The directory key (e.g., 'controllers', 'models')
The directory path
This RcFileTransformer instance for method chaining
Set command alias in the command aliases configuration
The alias name
The full command name
This RcFileTransformer instance for method chaining
Add a new test suite to the rcFile
The name of the test suite
File patterns for the test suite (string or array)
Optionaltimeout: numberOptional timeout in milliseconds (defaults to 2000)
This RcFileTransformer instance for method chaining
Add a new assembler hook
The type of hook to add
The path to the hook file
This RcFileTransformer instance for method chaining
Save the adonisrc.ts file with all applied transformations
Formats the file according to editor settings and saves it to disk.
Promise that resolves when the file is saved
RcFileTransformer is used to transform the
adonisrc.tsfile for adding new commands, providers, meta files etc.This class provides a fluent API for modifying the AdonisJS configuration file (adonisrc.ts) by adding various types of entries like providers, commands, preloaded files, meta files, and test suites.
Example