* Create a configured Ignitor instance with all specified parameters. * * @param appRoot - Application root directory URL * @param options - Optional Ignitor configuration options * * @example * ```ts * const ignitor = new IgnitorFactory() * .withCoreConfig() * .withCo
(appRoot: URL, options?: IgnitorOptions)
| 198 | * ``` |
| 199 | */ |
| 200 | create(appRoot: URL, options?: IgnitorOptions): Ignitor { |
| 201 | return new Ignitor(appRoot, options).tap((app) => { |
| 202 | app.booted(async () => { |
| 203 | for (let action of this.#preloadActions) { |
| 204 | await action(app) |
| 205 | } |
| 206 | }) |
| 207 | |
| 208 | if (this.#loadCoreProviders) { |
| 209 | this.#parameters.rcFileContents = this.#parameters.rcFileContents || {} |
| 210 | this.#parameters.rcFileContents.providers = this.#mergeCoreProviders( |
| 211 | this.#parameters.rcFileContents.providers |
| 212 | ) |
| 213 | } |
| 214 | this.#parameters.rcFileContents && app.rcContents(this.#parameters.rcFileContents) |
| 215 | this.#parameters.config && app.useConfig(this.#parameters.config) |
| 216 | }) |
| 217 | } |
| 218 | } |
no test coverage detected