-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathtailwindcss.ts
90 lines (87 loc) · 2.07 KB
/
tailwindcss.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
const commonOptions: Fig.Option[] = [
{
name: ["--help", "-h"],
description: "Display usage information",
},
];
const buildOptions: Fig.Option[] = [
{
name: ["-i", "--input"],
description: "Specify input file",
args: { name: "input file", template: "filepaths" },
},
{
name: ["-o", "--output"],
description: "Specify output file",
args: { name: "output file", template: "filepaths" },
},
{
name: ["-c", "--config"],
description: "Specify config file to use",
args: { name: "config file", template: "filepaths" },
},
{
name: "--postcss",
description: "Load custom PostCSS configuration",
args: {
name: "postcss config file",
template: "filepaths",
isOptional: true,
},
},
{
name: "--purge",
description:
"Content paths to use for removing unused classes. [Deprecated]: use `--content` instead",
},
{
name: "--content",
description: "Content paths to use for removing unused classes",
},
{
name: ["--watch", "-w"],
description: "Watch for changes and rebuild as needed",
},
{
name: ["--minify", "-m"],
description: "Minify the output",
},
{
name: "--no-autoprefixer",
description: "Disable autoprefixer",
},
...commonOptions,
];
const completionSpec: Fig.Spec = {
name: "tailwindcss",
description: "Tailwindcss CLI tools",
icon: "https://tailwindcss.com/favicons/favicon-32x32.png",
options: buildOptions,
subcommands: [
{
name: "init",
description: "Creates Tailwind config file. Default: tailwind.config.js",
args: {
name: "filename",
isOptional: true,
},
options: [
{
name: ["-p", "--postcss"],
description: "Initialize a 'postcss.config.js' file",
},
{
name: ["-f", "--full"],
description: "Initialize a full 'tailwind.config.js' file",
},
...commonOptions,
],
},
{
name: "build",
description: "Build CSS file",
options: buildOptions,
},
],
};
export default completionSpec;