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;; HTML index generator 25(executable 26 (public_name index_html_generator) 27 (name index_html_generator) 28 (package tailwind) 29 (libraries tailwind htmlit)) 30 31 32;; Generate HTML files from examples 33(rule 34 (target hello_tailwind_01.html) 35 (deps (:exe hello_tailwind_01.exe)) 36 (action (with-stdout-to %{target} (run %{exe})))) 37 38(rule 39 (target colors_and_typography_02.html) 40 (deps (:exe colors_and_typography_02.exe)) 41 (action (with-stdout-to %{target} (run %{exe})))) 42 43(rule 44 (target layout_and_spacing_03.html) 45 (deps (:exe layout_and_spacing_03.exe)) 46 (action (with-stdout-to %{target} (run %{exe})))) 47 48(rule 49 (target responsive_design_04.html) 50 (deps (:exe responsive_design_04.exe)) 51 (action (with-stdout-to %{target} (run %{exe})))) 52 53(rule 54 (target effects_and_variants_05.html) 55 (deps (:exe effects_and_variants_05.exe)) 56 (action (with-stdout-to %{target} (run %{exe})))) 57 58(rule 59 (target patterns_and_components_06.html) 60 (deps (:exe patterns_and_components_06.exe)) 61 (action (with-stdout-to %{target} (run %{exe})))) 62 63(rule 64 (target comprehensive_showcase_07.html) 65 (deps (:exe comprehensive_showcase_07.exe)) 66 (action (with-stdout-to %{target} (run %{exe})))) 67 68;; Generate CSS files using Tailwind CLI 69(rule 70 (targets hello_tailwind_01.css) 71 (deps 72 input.css 73 hello_tailwind_01.html) 74 (action 75 (run tailwindcss --input input.css --output %{targets} --minify))) 76 77(rule 78 (targets colors_and_typography_02.css) 79 (deps 80 input.css 81 colors_and_typography_02.html) 82 (action 83 (run tailwindcss --input input.css --output %{targets} --minify))) 84 85(rule 86 (targets layout_and_spacing_03.css) 87 (deps 88 input.css 89 layout_and_spacing_03.html) 90 (action 91 (run tailwindcss --input input.css --output %{targets} --minify))) 92 93(rule 94 (targets responsive_design_04.css) 95 (deps 96 input.css 97 responsive_design_04.html) 98 (action 99 (run tailwindcss --input input.css --output %{targets} --minify))) 100 101(rule 102 (targets effects_and_variants_05.css) 103 (deps 104 input.css 105 effects_and_variants_05.html) 106 (action 107 (run tailwindcss --input input.css --output %{targets} --minify))) 108 109(rule 110 (targets patterns_and_components_06.css) 111 (deps 112 input.css 113 patterns_and_components_06.html) 114 (action 115 (run tailwindcss --input input.css --output %{targets} --minify))) 116 117(rule 118 (targets comprehensive_showcase_07.css) 119 (deps 120 input.css 121 comprehensive_showcase_07.html) 122 (action 123 (run tailwindcss --input input.css --output %{targets} --minify))) 124 125;; Generate index.html page 126(rule 127 (target index.html) 128 (deps (:exe index_html_generator.exe)) 129 (action (with-stdout-to %{target} (run %{exe})))) 130 131;; Alias to build all HTML files 132(alias 133 (name examples-html) 134 (deps 135 index.html 136 hello_tailwind_01.html 137 colors_and_typography_02.html 138 layout_and_spacing_03.html 139 responsive_design_04.html 140 effects_and_variants_05.html 141 patterns_and_components_06.html 142 comprehensive_showcase_07.html)) 143 144;; Alias to build all CSS files (requires Tailwind CLI) 145;; Run: npm install -D @tailwindcss/cli 146(alias 147 (name examples-css) 148 (deps 149 (alias_rec examples-html) 150 hello_tailwind_01.css 151 colors_and_typography_02.css 152 layout_and_spacing_03.css 153 responsive_design_04.css 154 effects_and_variants_05.css 155 patterns_and_components_06.css 156 comprehensive_showcase_07.css)) 157 158;; Install generated files 159(install 160 (section doc) 161 (package tailwind) 162 (files 163 (index.html as examples/index.html) 164 (hello_tailwind_01.html as examples/hello_tailwind_01.html) 165 (hello_tailwind_01.css as examples/hello_tailwind_01.css) 166 (colors_and_typography_02.html as examples/colors_and_typography_02.html) 167 (colors_and_typography_02.css as examples/colors_and_typography_02.css) 168 (layout_and_spacing_03.html as examples/layout_and_spacing_03.html) 169 (layout_and_spacing_03.css as examples/layout_and_spacing_03.css) 170 (responsive_design_04.html as examples/responsive_design_04.html) 171 (responsive_design_04.css as examples/responsive_design_04.css) 172 (effects_and_variants_05.html as examples/effects_and_variants_05.html) 173 (effects_and_variants_05.css as examples/effects_and_variants_05.css) 174 (patterns_and_components_06.html as examples/patterns_and_components_06.html) 175 (patterns_and_components_06.css as examples/patterns_and_components_06.css) 176 (comprehensive_showcase_07.html as examples/comprehensive_showcase_07.html) 177 (comprehensive_showcase_07.css as examples/comprehensive_showcase_07.css)))