Tailwind classes in OCaml
1;; Notebook-style examples - progressive learning path
2(executables
3 (public_names
4 index
5 hello_tailwind
6 colors_and_typography
7 layout_and_spacing
8 responsive_design
9 effects_and_variants
10 patterns_and_components
11 comprehensive_showcase)
12 (names
13 index_00
14 hello_tailwind_01
15 colors_and_typography_02
16 layout_and_spacing_03
17 responsive_design_04
18 effects_and_variants_05
19 patterns_and_components_06
20 comprehensive_showcase_07)
21 (package tailwind)
22 (libraries tailwind tailwind-html htmlit unix))
23
24;; Legacy examples (maintained for compatibility)
25(executables
26 (public_names basic_usage module_usage advanced_features simple_html_example complete_demo tailwind_html_example improved_api_demo)
27 (names basic_usage module_usage advanced_features simple_html_example complete_demo tailwind_html_example improved_api_demo)
28 (package tailwind)
29 (libraries tailwind htmlit unix))
30
31;; Generate HTML files from examples
32(rule
33 (target hello_tailwind_01.html)
34 (deps (:exe hello_tailwind_01.exe))
35 (action (with-stdout-to %{target} (run %{exe}))))
36
37(rule
38 (target colors_and_typography_02.html)
39 (deps (:exe colors_and_typography_02.exe))
40 (action (with-stdout-to %{target} (run %{exe}))))
41
42(rule
43 (target layout_and_spacing_03.html)
44 (deps (:exe layout_and_spacing_03.exe))
45 (action (with-stdout-to %{target} (run %{exe}))))
46
47(rule
48 (target responsive_design_04.html)
49 (deps (:exe responsive_design_04.exe))
50 (action (with-stdout-to %{target} (run %{exe}))))
51
52(rule
53 (target effects_and_variants_05.html)
54 (deps (:exe effects_and_variants_05.exe))
55 (action (with-stdout-to %{target} (run %{exe}))))
56
57(rule
58 (target patterns_and_components_06.html)
59 (deps (:exe patterns_and_components_06.exe))
60 (action (with-stdout-to %{target} (run %{exe}))))
61
62(rule
63 (target comprehensive_showcase_07.html)
64 (deps (:exe comprehensive_showcase_07.exe))
65 (action (with-stdout-to %{target} (run %{exe}))))
66
67;; Generate CSS files using Tailwind CLI
68(rule
69 (targets hello_tailwind_01.css)
70 (deps
71 input.css
72 hello_tailwind_01.html)
73 (action
74 (run npx @tailwindcss/cli --input input.css --output %{targets} --content hello_tailwind_01.html --minify)))
75
76(rule
77 (targets colors_and_typography_02.css)
78 (deps
79 input.css
80 colors_and_typography_02.html)
81 (action
82 (run npx @tailwindcss/cli --input input.css --output %{targets} --content colors_and_typography_02.html --minify)))
83
84(rule
85 (targets layout_and_spacing_03.css)
86 (deps
87 input.css
88 layout_and_spacing_03.html)
89 (action
90 (run npx @tailwindcss/cli --input input.css --output %{targets} --content layout_and_spacing_03.html --minify)))
91
92(rule
93 (targets responsive_design_04.css)
94 (deps
95 input.css
96 responsive_design_04.html)
97 (action
98 (run npx @tailwindcss/cli --input input.css --output %{targets} --content responsive_design_04.html --minify)))
99
100(rule
101 (targets effects_and_variants_05.css)
102 (deps
103 input.css
104 effects_and_variants_05.html)
105 (action
106 (run npx @tailwindcss/cli --input input.css --output %{targets} --content effects_and_variants_05.html --minify)))
107
108(rule
109 (targets patterns_and_components_06.css)
110 (deps
111 input.css
112 patterns_and_components_06.html)
113 (action
114 (run npx @tailwindcss/cli --input input.css --output %{targets} --content patterns_and_components_06.html --minify)))
115
116(rule
117 (targets comprehensive_showcase_07.css)
118 (deps
119 input.css
120 comprehensive_showcase_07.html)
121 (action
122 (run npx @tailwindcss/cli --input input.css --output %{targets} --content comprehensive_showcase_07.html --minify)))
123
124;; Alias to build all HTML files
125(alias
126 (name examples-html)
127 (deps
128 hello_tailwind_01.html
129 colors_and_typography_02.html
130 layout_and_spacing_03.html
131 responsive_design_04.html
132 effects_and_variants_05.html
133 patterns_and_components_06.html
134 comprehensive_showcase_07.html))
135
136;; Alias to build all CSS files (requires Tailwind CLI)
137;; Run: npm install -D @tailwindcss/cli
138(alias
139 (name examples-css)
140 (deps
141 (alias_rec examples-html)
142 hello_tailwind_01.css
143 colors_and_typography_02.css
144 layout_and_spacing_03.css
145 responsive_design_04.css
146 effects_and_variants_05.css
147 patterns_and_components_06.css
148 comprehensive_showcase_07.css))
149
150;; Install generated files
151(install
152 (section doc)
153 (package tailwind)
154 (files
155 (hello_tailwind_01.html as examples/hello_tailwind_01.html)
156 (hello_tailwind_01.css as examples/hello_tailwind_01.css)
157 (colors_and_typography_02.html as examples/colors_and_typography_02.html)
158 (colors_and_typography_02.css as examples/colors_and_typography_02.css)
159 (layout_and_spacing_03.html as examples/layout_and_spacing_03.html)
160 (layout_and_spacing_03.css as examples/layout_and_spacing_03.css)
161 (responsive_design_04.html as examples/responsive_design_04.html)
162 (responsive_design_04.css as examples/responsive_design_04.css)
163 (effects_and_variants_05.html as examples/effects_and_variants_05.html)
164 (effects_and_variants_05.css as examples/effects_and_variants_05.css)
165 (patterns_and_components_06.html as examples/patterns_and_components_06.html)
166 (patterns_and_components_06.css as examples/patterns_and_components_06.css)
167 (comprehensive_showcase_07.html as examples/comprehensive_showcase_07.html)
168 (comprehensive_showcase_07.css as examples/comprehensive_showcase_07.css)))