Ensure build command is executed when using --output instead of -o (#13369)
This commit is contained in:
parent
99c4afd9cd
commit
c815221249
2 changed files with 8 additions and 4 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -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 },
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue