MCPcopy
hub / github.com/nuxt-modules/tailwindcss / ModuleHooks

Interface ModuleHooks

src/types.ts:157–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155// Hooks TODO: either deprecate or make hooks read-only. Modifications from hooks should rather be done by addition of new configs with defuFn strategy.
156
157export interface ModuleHooks {
158 /**
159 * Passes any Tailwind configuration read by the module for each (extended) [layer](https://nuxt.com/docs/getting-started/layers) and [path](https://tailwindcss.nuxtjs.org/getting-started/options#configpath) before merging all of them.
160 *
161 * @param tailwindConfig
162 * @returns
163 */
164 'tailwindcss:config': (tailwindConfig: Partial<TWConfig>) => void
165 /**
166 * Passes the resolved vanilla configuration read from all layers and paths with merging using [defu](https://github.com/unjs/defu).
167 *
168 * @param tailwindConfig
169 * @param configPath
170 * @param index
171 * @param configPaths
172 * @returns
173 */
174 'tailwindcss:loadConfig': (tailwindConfig: Partial<TWConfig> | undefined, configPath: string, index: number, configPaths: string[]) => void
175 /**
176 * Passes the complete resolved configuration with all defaults from [the full Tailwind config](https://github.com/tailwindlabs/tailwindcss/blob/master/stubs/config.full.js) using resolveConfig.
177 *
178 * @param tailwindConfig
179 * @returns
180 */
181 'tailwindcss:resolvedConfig': (tailwindConfig: ReturnType<typeof import('tailwindcss/resolveConfig')>, oldTailwindConfig: TWConfig | undefined) => void
182}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected