plugin-api.test.ts — tailwindcss Source File
Architecture documentation for plugin-api.test.ts, a typescript file in the tailwindcss codebase. 9 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 6887ddc2_d1b1_dd38_0f59_c2a51c756bc5["plugin-api.test.ts"] 914a5326_dcdd_e839_bbc4_d6545cf4c5d5["plugin.ts"] 6887ddc2_d1b1_dd38_0f59_c2a51c756bc5 --> 914a5326_dcdd_e839_bbc4_d6545cf4c5d5 f9b7eac1_3b10_a208_408b_b98998a33868["run.ts"] 6887ddc2_d1b1_dd38_0f59_c2a51c756bc5 --> f9b7eac1_3b10_a208_408b_b98998a33868 28c8c12b_7bfb_c956_c83b_681f0ac38ee2["optimizeCss"] 6887ddc2_d1b1_dd38_0f59_c2a51c756bc5 --> 28c8c12b_7bfb_c956_c83b_681f0ac38ee2 4b9fb355_7055_4825_6db8_a5dd6f45c06e["default-theme.ts"] 6887ddc2_d1b1_dd38_0f59_c2a51c756bc5 --> 4b9fb355_7055_4825_6db8_a5dd6f45c06e da5d1116_ab2a_437a_6b13_c1429fd546fa["plugin-api.ts"] 6887ddc2_d1b1_dd38_0f59_c2a51c756bc5 --> da5d1116_ab2a_437a_6b13_c1429fd546fa e539d5e5_cfdf_1f5d_370f_6bc86f6280b5["CssInJs"] 6887ddc2_d1b1_dd38_0f59_c2a51c756bc5 --> e539d5e5_cfdf_1f5d_370f_6bc86f6280b5 78ae59ed_15ed_26ff_5333_748db1fc1326["PluginAPI"] 6887ddc2_d1b1_dd38_0f59_c2a51c756bc5 --> 78ae59ed_15ed_26ff_5333_748db1fc1326 f1e05e5f_c1b2_a3f5_b2e8_3317b9243ac3["vitest"] 6887ddc2_d1b1_dd38_0f59_c2a51c756bc5 --> f1e05e5f_c1b2_a3f5_b2e8_3317b9243ac3 9136f017_616b_a3c5_5967_4217d21e2fc8[".."] 6887ddc2_d1b1_dd38_0f59_c2a51c756bc5 --> 9136f017_616b_a3c5_5967_4217d21e2fc8 style 6887ddc2_d1b1_dd38_0f59_c2a51c756bc5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { describe, expect, test, vi } from 'vitest'
import { compile } from '..'
import plugin from '../plugin'
import { optimizeCss } from '../test-utils/run'
import defaultTheme from './default-theme'
import type { CssInJs, PluginAPI } from './plugin-api'
const css = String.raw
describe('theme', async () => {
test('plugin theme can contain objects', async () => {
let input = css`
@tailwind utilities;
@plugin "my-plugin";
`
let compiler = await compile(input, {
loadModule: async (id, base) => {
return {
path: '',
base,
module: plugin(
function ({ addBase, theme }) {
addBase({
'@keyframes enter': theme('keyframes.enter'),
'@keyframes exit': theme('keyframes.exit'),
})
},
{
theme: {
extend: {
keyframes: {
enter: {
from: {
opacity: 'var(--tw-enter-opacity, 1)',
transform:
'translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))',
},
},
exit: {
to: {
opacity: 'var(--tw-exit-opacity, 1)',
transform:
'translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))',
},
},
},
},
},
},
),
}
},
})
expect(compiler.build([])).toMatchInlineSnapshot(`
"@layer base {
@keyframes enter {
from {
opacity: var(--tw-enter-opacity, 1);
// ... (4536 more lines)
Domain
Dependencies
Source
Frequently Asked Questions
What does plugin-api.test.ts do?
plugin-api.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the Oxide domain.
What does plugin-api.test.ts depend on?
plugin-api.test.ts imports 9 module(s): .., CssInJs, PluginAPI, default-theme.ts, optimizeCss, plugin-api.ts, plugin.ts, run.ts, and 1 more.
Where is plugin-api.test.ts in the architecture?
plugin-api.test.ts is located at packages/tailwindcss/src/compat/plugin-api.test.ts (domain: Oxide, directory: packages/tailwindcss/src/compat).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free