Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Remove percentage values for `translate-z` utilities ([#13321](https://github.com/tailwindlabs/tailwindcss/pull/13321), [#13327](https://github.com/tailwindlabs/tailwindcss/pull/13327))
- `@tailwind/vite` now generates unique CSS bundle hashes when the Tailwind-generated CSS changes ([#13218](https://github.com/tailwindlabs/tailwindcss/pull/13218))
- Inherit letter spacing in form controls ([#13328](https://github.com/tailwindlabs/tailwindcss/pull/13328))
- Ensure `build` command is executed when using `--output` instead of `-o` ([#13369](https://github.com/tailwindlabs/tailwindcss/pull/13369))

## [4.0.0-alpha.10] - 2024-03-19

Expand Down
11 changes: 7 additions & 4 deletions packages/@tailwindcss-cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ const sharedOptions = {
'--help': { type: 'boolean', description: 'Display usage information', alias: '-h' },
} satisfies Arg

const shared = args(sharedOptions)
const command = shared._[0]
const flags = args({
...build.options(),
...sharedOptions,
})
const command = flags._[0]

// Right now we don't support any sub-commands. Let's show the help message
// instead.
Expand All @@ -33,7 +36,7 @@ if (command) {
//
// - `tailwindcss -o output.css` // should run the build command, not show the help message
// - `tailwindcss > output.css` // should run the build command, not show the help message
if ((process.stdout.isTTY && !process.argv.slice(2).includes('-o')) || shared['--help']) {
if ((process.stdout.isTTY && !flags['--output']) || flags['--help']) {
help({
usage: ['tailwindcss [--input input.css] [--output output.css] [--watch] [options…]'],
options: { ...build.options(), ...sharedOptions },
Expand All @@ -42,4 +45,4 @@ if ((process.stdout.isTTY && !process.argv.slice(2).includes('-o')) || shared['-
}

// Handle the build command
build.handle(args(build.options()))
build.handle(flags)