From 6ce8a21223b0d74a77d5ea0160d86f49db94ace1 Mon Sep 17 00:00:00 2001 From: Anurag Soni Date: Tue, 24 Mar 2020 22:16:22 -0400 Subject: [PATCH] add documentation link in dune-project --- dune-project | 39 +++++++++++++++++++++++---------------- examples/hello_world.ml | 11 +++++------ opium.opam | 1 + opium_kernel.opam | 1 + 4 files changed, 30 insertions(+), 22 deletions(-) diff --git a/dune-project b/dune-project index 9cfd1fea..15955d8e 100644 --- a/dune-project +++ b/dune-project @@ -1,20 +1,32 @@ (lang dune 1.11) + (using fmt 1.2) + (name opium) + (generate_opam_files true) -(source (github rgrinberg/opium)) +(source + (github rgrinberg/opium)) + (authors "Rudi Grinberg") + (maintainers "Rudi Grinberg ") + +(documentation https://rgrinberg.github.io/opium/) + (license MIT) (package (name opium_kernel) (synopsis "Sinatra like web toolkit based on Lwt + Cohttp") - (description "Opium_kernel is the Unix indpendent core of Opium. Useful for extremely portable environments such as mirage.") + (description + "Opium_kernel is the Unix indpendent core of Opium. Useful for extremely portable environments such as mirage.") (depends - (ocaml (>= 4.04.1)) - (dune (>= 1.11)) + (ocaml + (>= 4.04.1)) + (dune + (>= 1.11)) hmap cohttp cohttp-lwt @@ -24,22 +36,18 @@ ppx_fields_conv ppx_sexp_conv re - (alcotest :with-test)) - ) + (alcotest :with-test))) (package (name opium) (synopsis "Sinatra like web toolkit based on Lwt + Cohttp") (description - "Opium is a minimalistic library for quickly binding functions to http routes. Its features include (but not limited to): - - Middleware system for app independent components - A simple router for matching urls and parsing parameters - Request/Response pretty printing for easier debugging - ") + "Opium is a minimalistic library for quickly binding functions to http routes. Its features include (but not limited to):\n\n Middleware system for app independent components\n A simple router for matching urls and parsing parameters\n Request/Response pretty printing for easier debugging\n ") (depends - (ocaml (>= 4.04.1)) - (dune (>= 1.11)) + (ocaml + (>= 4.04.1)) + (dune + (>= 1.11)) opium_kernel cohttp-lwt-unix ezjsonm @@ -50,5 +58,4 @@ ppx_sexp_conv re magic-mime - (alcotest :with-test)) - ) + (alcotest :with-test))) diff --git a/examples/hello_world.ml b/examples/hello_world.ml index 058d8480..62d43640 100644 --- a/examples/hello_world.ml +++ b/examples/hello_world.ml @@ -13,12 +13,11 @@ let print_param = let streaming = let open Lwt.Infix in get "/hello/stream" (fun _req -> - (* [create_stream] returns a push function that can be used to - push new content onto the stream. [f] is function that - expects to receive a promise that gets resolved when the user - decides that they have pushed all their content onto the stream. - When the promise forwarded to [f] gets resolved, the stream will be - closed. *) + (* [create_stream] returns a push function that can be used to push new + content onto the stream. [f] is function that expects to receive a + promise that gets resolved when the user decides that they have pushed + all their content onto the stream. When the promise forwarded to [f] + gets resolved, the stream will be closed. *) let f, push = App.create_stream () in let timers = List.map diff --git a/opium.opam b/opium.opam index 413e9655..3a7306da 100644 --- a/opium.opam +++ b/opium.opam @@ -12,6 +12,7 @@ maintainer: ["Rudi Grinberg "] authors: ["Rudi Grinberg"] license: "MIT" homepage: "https://github.com/rgrinberg/opium" +doc: "https://rgrinberg.github.io/opium/" bug-reports: "https://github.com/rgrinberg/opium/issues" depends: [ "ocaml" {>= "4.04.1"} diff --git a/opium_kernel.opam b/opium_kernel.opam index 978eb7d5..4317fb88 100644 --- a/opium_kernel.opam +++ b/opium_kernel.opam @@ -7,6 +7,7 @@ maintainer: ["Rudi Grinberg "] authors: ["Rudi Grinberg"] license: "MIT" homepage: "https://github.com/rgrinberg/opium" +doc: "https://rgrinberg.github.io/opium/" bug-reports: "https://github.com/rgrinberg/opium/issues" depends: [ "ocaml" {>= "4.04.1"}