File tree Expand file tree Collapse file tree 18 files changed +533
-42
lines changed Expand file tree Collapse file tree 18 files changed +533
-42
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,5 @@ src/loader/cmti.ml
6
6
src/loader/doc_attr.ml
7
7
src/loader/*.cppo.ml
8
8
src/model/*.cppo.ml
9
+ src/vendor/*.ml
9
10
test/xref2/lib/*
Original file line number Diff line number Diff line change 1
1
(documentation
2
2
(package odoc)
3
- (mld_files contributing driver dune features index interface
4
- ocamldoc_differences odoc_for_authors parent_child_spec))
3
+ (mld_files
4
+ contributing
5
+ driver
6
+ dune
7
+ features
8
+ index
9
+ interface
10
+ ocamldoc_differences
11
+ odoc_for_authors
12
+ parent_child_spec))
5
13
6
14
(rule
7
15
(alias docgen)
Original file line number Diff line number Diff line change 3
3
(public_name odoc.examples)
4
4
(enabled_if
5
5
(> %{ocaml_version} 4.11))
6
- (modules_without_implementation expansion resolution unexposed wrapping
7
- markup))
6
+ (modules_without_implementation
7
+ expansion
8
+ resolution
9
+ unexposed
10
+ wrapping
11
+ markup))
Original file line number Diff line number Diff line change 1
1
(documentation
2
2
(package odoc)
3
- (mld_files odoc_document odoc_examples odoc_html odoc_latex odoc_loader
4
- odoc_manpage odoc_model odoc_model_desc odoc_odoc odoc_xref2
5
- odoc_xref_test))
3
+ (mld_files
4
+ odoc_document
5
+ odoc_examples
6
+ odoc_html
7
+ odoc_latex
8
+ odoc_loader
9
+ odoc_manpage
10
+ odoc_model
11
+ odoc_model_desc
12
+ odoc_odoc
13
+ odoc_xref2
14
+ odoc_xref_test))
Original file line number Diff line number Diff line change 1
- (lang dune 2 .7 )
1
+ (lang dune 3 .0 )
2
2
(name odoc)
3
3
( cram enable)
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ depends: [
43
43
44
44
"ppx_expect" {with-test}
45
45
"bos" {with-test}
46
+ "crunch" {with-test}
46
47
47
48
("ocaml" {< "4.07.0" & with-test} | "bisect_ppx" {with-test & > "2.5.0"})
48
49
("ocaml" {< "4.03.0" & with-test} | "mdx" {with-test})
Original file line number Diff line number Diff line change 1
1
(library
2
2
(name odoc_odoc)
3
3
(public_name odoc.odoc)
4
- (libraries compiler-libs.common fpath odoc_html odoc_manpage odoc_latex
5
- odoc_loader odoc_model odoc_xref2 tyxml unix)
4
+ (libraries
5
+ compiler-libs.common
6
+ fpath
7
+ odoc_html
8
+ odoc_manpage
9
+ odoc_latex
10
+ odoc_vendor
11
+ odoc_loader
12
+ odoc_model
13
+ odoc_xref2
14
+ tyxml
15
+ unix)
6
16
(instrumentation
7
17
(backend bisect_ppx)))
8
18
21
31
(cat %{css})
22
32
(echo "|css}")))))
23
33
24
- (rule
25
- (targets highlight_js.ml)
26
- (deps
27
- (:js ../vendor/highlight.pack.js))
28
- (action
29
- (with-stdout-to
30
- %{targets}
31
- (progn
32
- (echo "let content = {js|")
33
- (cat %{js})
34
- (echo "|js}")))))
35
-
36
34
; Install theme files for odig.
37
35
38
36
(install
Original file line number Diff line number Diff line change 1
1
let iter_files f ?(without_theme = false ) output_directory =
2
2
let file name content =
3
- let name =
4
- Fs.File. create ~directory: output_directory ~name |> Fs.File. to_string
5
- in
3
+ let name = Fs.File. create ~directory: output_directory ~name in
6
4
f name content
7
5
in
8
-
9
6
if not without_theme then file " odoc.css" Css_file. content;
10
- file " highlight.pack.js" Highlight_js. content
7
+ let files = Odoc_vendor. file_list in
8
+ List. iter
9
+ (fun f ->
10
+ match Odoc_vendor. read f with
11
+ | Some content -> file f content
12
+ | None -> () )
13
+ files
11
14
12
15
let write =
13
16
iter_files (fun name content ->
17
+ let dir = Fs.File. dirname name in
18
+ Fs.Directory. mkdir_p dir;
19
+ let name = Fs.File. to_string name in
14
20
let channel = open_out name in
15
21
output_string channel content;
16
22
close_out channel)
17
23
18
- let print_filenames = iter_files (fun name _content -> print_endline name)
24
+ let print_filenames =
25
+ iter_files (fun name _content -> print_endline (Fs.File. to_string name))
Original file line number Diff line number Diff line change
1
+ (rule
2
+ (alias runtest)
3
+ (deps
4
+ (:x odoc_vendor.ml)
5
+ (glob_files *.js)
6
+ (glob_files *.css)
7
+ (glob_files_rec *.woff2))
8
+ (action
9
+ (progn
10
+ (setenv
11
+ SOURCE_DATE_EPOCH
12
+ 0
13
+ (run ocaml-crunch . -e js -e css -e woff2 -o %{x}.corrected -m plain -s))
14
+ (diff? %{x} %{x}.corrected))))
15
+
16
+ (library
17
+ (name odoc_vendor)
18
+ (public_name odoc.vendor)
19
+ (wrapped false))
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments