pre-publish-optimizations.mjs — tailwindcss Source File
Architecture documentation for pre-publish-optimizations.mjs, a javascript file in the tailwindcss codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 2c1e8741_ae6a_3340_9165_e2e312f4cdb5["pre-publish-optimizations.mjs"] b75e8457_6610_e7ce_eeaf_9a1dd10fc510["promises"] 2c1e8741_ae6a_3340_9165_e2e312f4cdb5 --> b75e8457_6610_e7ce_eeaf_9a1dd10fc510 89aef3dd_1eed_c141_d425_b8949215a653["node:path"] 2c1e8741_ae6a_3340_9165_e2e312f4cdb5 --> 89aef3dd_1eed_c141_d425_b8949215a653 7c3c22f8_be1a_4490_9f3e_622280887fe1["postcss"] 2c1e8741_ae6a_3340_9165_e2e312f4cdb5 --> 7c3c22f8_be1a_4490_9f3e_622280887fe1 c1a54fbc_832b_3231_fea8_2b19516c6781["postcss-import"] 2c1e8741_ae6a_3340_9165_e2e312f4cdb5 --> c1a54fbc_832b_3231_fea8_2b19516c6781 10ecf419_277e_3620_6d06_e109dd18d553["prettier"] 2c1e8741_ae6a_3340_9165_e2e312f4cdb5 --> 10ecf419_277e_3620_6d06_e109dd18d553 style 2c1e8741_ae6a_3340_9165_e2e312f4cdb5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import fs from 'node:fs/promises'
import path from 'node:path'
import postcss from 'postcss'
import atImport from 'postcss-import'
import prettier from 'prettier'
// Performance optimization: Inline the contents of the `tailwindcss/index.css`
// file so that we don't need to handle imports at runtime.
{
let __dirname = path.dirname(new URL(import.meta.url).pathname)
let file = path.resolve(__dirname, '../packages/tailwindcss/index.css')
let contents = await fs.readFile(file, 'utf-8')
let inlined = await prettier.format(
await postcss()
.use(atImport())
.process(contents, { from: file })
.then((result) => result.css),
{ filepath: file },
)
await fs.writeFile(file, inlined, 'utf-8')
}
Domain
Subdomains
Functions
Dependencies
- node:path
- postcss
- postcss-import
- prettier
- promises
Source
Frequently Asked Questions
What does pre-publish-optimizations.mjs do?
pre-publish-optimizations.mjs is a source file in the tailwindcss codebase, written in javascript. It belongs to the Oxide domain, PreProcessors subdomain.
What functions are defined in pre-publish-optimizations.mjs?
pre-publish-optimizations.mjs defines 1 function(s): inlined.
What does pre-publish-optimizations.mjs depend on?
pre-publish-optimizations.mjs imports 5 module(s): node:path, postcss, postcss-import, prettier, promises.
Where is pre-publish-optimizations.mjs in the architecture?
pre-publish-optimizations.mjs is located at scripts/pre-publish-optimizations.mjs (domain: Oxide, subdomain: PreProcessors, directory: scripts).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free