* Create a config with default options * * @param {*} newConfig * @return {Object }
(newConfig)
| 67 | * @return {Object<string, *>} |
| 68 | */ |
| 69 | static create(newConfig) { |
| 70 | config = deepMerge(deepClone(defaultConfig), newConfig) |
| 71 | // Re-apply every hook against the freshly built config; hooks added later |
| 72 | // (e.g. from plugin boot) stay pending until runPendingHooks. Array |
| 73 | // iterators re-check length on each step, so hooks pushed during a hook |
| 74 | // execution are visited in this same pass. |
| 75 | for (const hook of hooks) applyHook(hook, config) |
| 76 | return config |
| 77 | } |
| 78 | |
| 79 | /** |
| 80 | * Load config from a file. |
no test coverage detected