Skip to content

Commit 0597489

Browse files
authored
Move the CLI to its own package @tailwindcss/cli (tailwindlabs#13095)
* move `cli` to its own package `@tailwindcss/cli` * minify builds when using `tsup` * prefer tsup cli flag over tsup.config.ts file * add `--clean`, to make sure `dist/` folders are cleaned before building * make CLI esm only * use version of `tailwindcss` instead of the version of `@tailwindcss/cli`
1 parent bab74da commit 0597489

19 files changed

Lines changed: 341 additions & 3652 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "@tailwindcss/cli",
3+
"version": "4.0.0-alpha.1",
4+
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
5+
"license": "MIT",
6+
"repository": "https://github.com/tailwindlabs/tailwindcss.git",
7+
"bugs": "https://github.com/tailwindlabs/tailwindcss/issues",
8+
"homepage": "https://tailwindcss.com",
9+
"scripts": {
10+
"lint": "tsc --noEmit",
11+
"build": "tsup-node ./src/index.ts --format esm --minify --clean",
12+
"dev": "pnpm run build -- --watch"
13+
},
14+
"bin": {
15+
"tailwindcss": "./dist/index.mjs"
16+
},
17+
"exports": {
18+
"./package.json": "./package.json"
19+
},
20+
"files": [
21+
"dist"
22+
],
23+
"dependencies": {
24+
"@parcel/watcher": "^2.4.1",
25+
"@tailwindcss/oxide": "workspace:^",
26+
"mri": "^1.2.0",
27+
"picocolors": "^1.0.0",
28+
"postcss": "8.4.24",
29+
"postcss-import": "^16.0.0",
30+
"tailwindcss": "workspace:^"
31+
},
32+
"devDependencies": {
33+
"@types/postcss-import": "^14.0.3"
34+
}
35+
}

packages/tailwindcss/src/cli/commands/build/index.ts renamed to packages/@tailwindcss-cli/src/commands/build/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import fs from 'node:fs/promises'
1212
import path from 'node:path'
1313
import postcss from 'postcss'
1414
import atImport from 'postcss-import'
15-
import { compile, optimizeCss } from '../../..'
15+
import { compile, optimizeCss } from 'tailwindcss'
1616
import type { Arg, Result } from '../../utils/args'
1717
import {
1818
eprintln,
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)