package slipshow

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file data_files.ml

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
type file =
  | Slipshow_js
  | Slip_internal_css
  | Slip_system_css
  | Mathjax_js
  | Highlight_js
  | Highlight_css
  | Highlight_js_ocaml

let string_of_file = function
  | Slipshow_js -> "slipshow.cdn.min.js.crunch"
  | Mathjax_js -> "tex-svg.js.crunch"
  | Highlight_css -> "highlight-js.css.crunch"
  | Highlight_js -> "highlight-js.js.crunch"
  | Highlight_js_ocaml -> "highlight-js.ocaml.js.crunch"
  | _ -> assert false

let read f =match f with
  | Slipshow_js -> [%blob "src/engine/slipshow.js"]
  | Slip_internal_css -> [%blob "src/engine/slipshow-internal.css"]
  | Slip_system_css -> [%blob "src/engine/slipshow-system.css"]
  | _ ->
     Data_contents.read (string_of_file f)
     |> function
       | Some c -> c
       | None -> assert false
OCaml

Innovation. Community. Security.