From 42918d99b49b02a9e254d38d3dbe987fea336201 Mon Sep 17 00:00:00 2001 From: zapashcanon Date: Sun, 30 Jan 2022 22:19:22 +0100 Subject: [PATCH] add boilerplate --- .gitignore | 5 +---- .ocamlformat | 42 ++++++++++++++++++++++++++++++++++++++++++ CHANGES.md | 1 + LICENSE.md | 8 ++++++++ README.md | 40 ++++++++++++++++++++++++++++++++++++++++ doc/dune | 3 +++ doc/index.mld | 17 +++++++++++++++++ dune-project | 32 +++++++++++++++++++++++++++++--- example/dune | 3 +++ example/main.ml | 1 + test/dune | 3 +++ test/test.ml | 1 + 12 files changed, 149 insertions(+), 7 deletions(-) create mode 100644 .ocamlformat create mode 100644 CHANGES.md create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 doc/dune create mode 100644 doc/index.mld create mode 100644 example/dune create mode 100644 example/main.ml create mode 100644 test/dune create mode 100644 test/test.ml diff --git a/.gitignore b/.gitignore index 4c9c859..e35d885 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1 @@ -_build/ -_coverage/ -*.merlin -*.install +_build diff --git a/.ocamlformat b/.ocamlformat new file mode 100644 index 0000000..cc34f68 --- /dev/null +++ b/.ocamlformat @@ -0,0 +1,42 @@ +version=0.20.1 +assignment-operator=end-line +break-cases=fit +break-fun-decl=wrap +break-fun-sig=wrap +break-infix=wrap +break-infix-before-func=false +break-separators=before +break-sequences=true +cases-exp-indent=2 +cases-matching-exp-indent=normal +doc-comments=before +doc-comments-padding=2 +doc-comments-tag-only=default +dock-collection-brackets=false +exp-grouping=preserve +field-space=loose +if-then-else=compact +indicate-multiline-delimiters=space +indicate-nested-or-patterns=unsafe-no +infix-precedence=indent +leading-nested-match-parens=false +let-and=sparse +let-binding-spacing=compact +let-module=compact +margin=80 +max-indent=68 +module-item-spacing=sparse +ocp-indent-compat=false +parens-ite=false +parens-tuple=always +parse-docstrings=true +sequence-blank-line=preserve-one +sequence-style=terminator +single-case=compact +space-around-arrays=true +space-around-lists=true +space-around-records=true +space-around-variants=true +type-decl=sparse +wrap-comments=false +wrap-fun-args=true diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..d9cd2e7 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1 @@ +## unreleased diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..03530e3 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,8 @@ +The ISC License (ISC) +===================== + +Copyright © 2022, Léo Andrès + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..86bdfa1 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# sun + +[sun] is an [OCaml] executable/library to TODO. + +## Installation + +`sun` can be installed with [opam]: + +```sh +opam install sun +``` + +If you don't have `opam`, you can install it following the [how to install opam] guide. + +If you can't or don't want to use `opam`, consult the [opam file] for build instructions. + +## Quickstart + +```ocaml +let () = Format.printf "TODO@." +``` + +For more, have a look at the [example] folder, at the [documentation] or at the [test suite]. + +## About + +- [LICENSE] +- [CHANGELOG] + +[CHANGELOG]: ./CHANGES.md +[example]: ./example +[LICENSE]: ./LICENSE.md +[opam file]: ./sun.opam +[test suite]: ./test + +[documentation]: https://doc.zapashcanon.fr/sun +[how to install opam]: https://opam.ocaml.org/doc/Install.html +[OCaml]: https://ocaml.org +[opam]: https://opam.ocaml.org/ +[sun]: https://git.zapashcanon.fr/zapashcanon/sun diff --git a/doc/dune b/doc/dune new file mode 100644 index 0000000..c41c7ee --- /dev/null +++ b/doc/dune @@ -0,0 +1,3 @@ +(documentation + (package sun) + (mld_files index)) diff --git a/doc/index.mld b/doc/index.mld new file mode 100644 index 0000000..fa7eba6 --- /dev/null +++ b/doc/index.mld @@ -0,0 +1,17 @@ +{0 sun} + +{{:https://https://git.zapashcanon.fr/zapashcanon/sun} sun} is an {{:https://ocaml.org} OCaml} library/executable to TODO. + +{1:api API} + +{!modules: +Sun +} + +{1:private_api Private API} + +You shouldn't have to use any of these modules, they're used internally only. + +{!modules: +TODO +} diff --git a/dune-project b/dune-project index 8b3c5a1..f3b5274 100644 --- a/dune-project +++ b/dune-project @@ -1,7 +1,33 @@ -(lang dune 2.1) +(lang dune 2.9) + +(implicit_transitive_deps false) (name sun) -(version 0.2) - (license ISC) + +(authors "Léo Andrès ") + +(maintainers "Léo Andrès ") + +(source + (uri git+https://git.zapashcanon.fr/zapashcanon/sun.git)) + +(homepage https://git.zapashcanon.fr/zapashcanon/sun) + +(bug_reports https://git.zapashcanon.fr/zapashcanon/sun/issues) + +(documentation https://doc.zapashcanon.fr/sun) + +(generate_opam_files true) + +(package + (name sun) + (synopsis "OCaml library/executable to TODO") + (description + "sun is an OCaml library/executable to TODO.") + (tags + (sun TODO TODO TODO TODO)) + (depends + (ocaml + (>= 4.08)))) diff --git a/example/dune b/example/dune new file mode 100644 index 0000000..e36b142 --- /dev/null +++ b/example/dune @@ -0,0 +1,3 @@ +(executable + (name main) + (modules main)) diff --git a/example/main.ml b/example/main.ml new file mode 100644 index 0000000..16c9b9f --- /dev/null +++ b/example/main.ml @@ -0,0 +1 @@ +let () = Format.printf "TODO@." diff --git a/test/dune b/test/dune new file mode 100644 index 0000000..f929c11 --- /dev/null +++ b/test/dune @@ -0,0 +1,3 @@ +(test + (name test) + (modules test)) diff --git a/test/test.ml b/test/test.ml new file mode 100644 index 0000000..29ef5f9 --- /dev/null +++ b/test/test.ml @@ -0,0 +1 @@ +let () = assert true (* TODO *)