Skip to content

Commit

Permalink
Add new skeletons, documentation and small clean up of substitutions
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabrice Le Fessant committed Dec 10, 2020
1 parent e83819a commit d20409c
Show file tree
Hide file tree
Showing 35 changed files with 673 additions and 171 deletions.
35 changes: 15 additions & 20 deletions .drom
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

# hash of toml configuration files
# used for generation of all files
a559d065eaaccf4da2420d8599285242:.
dff636cbe399e29f256a1483400e4c29:.
# end context for .

# begin context for .github/workflows/doc-deploy.yml
# file .github/workflows/doc-deploy.yml
fa97e8d29135d03ad98579323218d9ce:.github/workflows/doc-deploy.yml
2960a63902d7a6b19edf86535c775979:.github/workflows/doc-deploy.yml
# end context for .github/workflows/doc-deploy.yml

# begin context for .github/workflows/workflow.yml
# file .github/workflows/workflow.yml
2578e01a3fd098263d6d8506582058bd:.github/workflows/workflow.yml
1d44e24a3d8eedd52b9d7fe98b717f42:.github/workflows/workflow.yml
# end context for .github/workflows/workflow.yml

# begin context for .gitignore
Expand All @@ -37,7 +37,7 @@ c4217a22064a4a18f9587b930b250fbe:LICENSE.md

# begin context for Makefile
# file Makefile
e75cd58a1a17c1c8db2fc32884d8edcb:Makefile
29c25a9a205de631c328133a9a7fabfe:Makefile
# end context for Makefile

# begin context for README.md
Expand All @@ -62,7 +62,7 @@ b091dd96e8b553dd7a7df285279d7d9e:README.md

# begin context for docs/index.html
# file docs/index.html
0f8b4e9f9f5fdd8a79cf4053ace6d538:docs/index.html
6b67a3189c8c2cb0b83e86a7bd5ebd6f:docs/index.html
# end context for docs/index.html

# begin context for docs/sphinx/index.html
Expand All @@ -72,12 +72,12 @@ b091dd96e8b553dd7a7df285279d7d9e:README.md

# begin context for docs/style.css
# file docs/style.css
0085152add896d7bab7b1a744d2a9af7:docs/style.css
1eb62145308aed80e0f86b959d6f7fd0:docs/style.css
# end context for docs/style.css

# begin context for drom.opam
# file drom.opam
7f00a37ed8231d6524f873c63fbf1d5c:drom.opam
921f270eed0e5dee73153c852aff0a1d:drom.opam
# end context for drom.opam

# begin context for drom.toml
Expand All @@ -87,17 +87,17 @@ b091dd96e8b553dd7a7df285279d7d9e:README.md

# begin context for drom_lib.opam
# file drom_lib.opam
f23add29b54c9b6db85faedc1e1c331b:drom_lib.opam
9e3add3dce40d01537aa6258731c2bdd:drom_lib.opam
# end context for drom_lib.opam

# begin context for dune
# file dune
ff0b2308dfc7350e6ac7d519836f9e47:dune
7efb0eaa6d77cffd7d13712278f31b30:dune
# end context for dune

# begin context for dune-project
# file dune-project
467f046c5e5e73fae0fe4884b82c82e0:dune-project
8ef5717bd75c05ee5d5fdff782e782fc:dune-project
# end context for dune-project

# begin context for dune_
Expand All @@ -117,7 +117,7 @@ a44c87f3a364dd95f55427fe40b2c5d1:sphinx/about.rst

# begin context for sphinx/conf.py
# file sphinx/conf.py
38bd7d44a9d086cc3e76743118ef4b5e:sphinx/conf.py
c5e0b1e03c5491a779d30531d85721c0:sphinx/conf.py
# end context for sphinx/conf.py

# begin context for sphinx/index.rst
Expand All @@ -132,7 +132,7 @@ a44c87f3a364dd95f55427fe40b2c5d1:sphinx/about.rst

# begin context for sphinx/license.rst
# file sphinx/license.rst
cf3f86e8f7d8e90e663c3cb7e438057d:sphinx/license.rst
fcee58f602925845277cb358d934aa5f:sphinx/license.rst
# end context for sphinx/license.rst

# begin context for src/drom/dune
Expand All @@ -147,7 +147,7 @@ cf3f86e8f7d8e90e663c3cb7e438057d:sphinx/license.rst

# begin context for src/drom/index.mld
# file src/drom/index.mld
d947d2a8c369bc5ff232874cc3b568ac:src/drom/index.mld
19901e0000918a468551ef403741bf9f:src/drom/index.mld
# end context for src/drom/index.mld

# begin context for src/drom/main.ml
Expand All @@ -165,14 +165,9 @@ a8b8d27eed41f01c76e6535dbd620f52:src/drom/main.ml
383504e764043311ed98d2cf09924c35:src/drom_lib/dune
# end context for src/drom_lib/dune

# begin context for src/drom_lib/dune_
# file src/drom_lib/dune_
6fbe050e4f0c8f0f7fc290b66d3389ae:src/drom_lib/dune_
# end context for src/drom_lib/dune_

# begin context for src/drom_lib/index.mld
# file src/drom_lib/index.mld
dfda02aaec08f18742582243e9cd6748:src/drom_lib/index.mld
dcdcd597bf92e2c3ed6f84f1e6d5e5cb:src/drom_lib/index.mld
# end context for src/drom_lib/index.mld

# begin context for src/drom_lib/package.toml
Expand All @@ -182,7 +177,7 @@ dfda02aaec08f18742582243e9cd6748:src/drom_lib/index.mld

# begin context for src/drom_lib/version.mlt
# file src/drom_lib/version.mlt
58164b9f0eeeaedc5270ba6f2d52b654:src/drom_lib/version.mlt
6f158b069dd55ebfb458416aa1a4ba51:src/drom_lib/version.mlt
# end context for src/drom_lib/version.mlt

# begin context for test/expect-tests/dune
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/doc-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: doc-deploy
on:
push:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Main Workflow

on:
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

# Generated by "drom project"
.PHONY: all build build-deps sphinx doc-common odoc view fmt fmt-check install dev-deps test
.PHONY: all build build-depsfmt fmt-check install dev-deps test
.PHONY: clean distclean

DEV_DEPS := merlin ocamlformat odoc ppx_expect ppx_inline_test
Expand All @@ -17,6 +16,8 @@ build-deps:
fi
opam install ./*.opam --deps-only


.PHONY: doc-common odoc view sphinx
doc-common:
opam exec -- dune build @doc
mkdir -p _drom/docs
Expand Down
1 change: 0 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<!DOCTYPE html>
<html lang="en">
<head>
Expand Down
1 change: 0 additions & 1 deletion docs/style.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

body {
color: #444;
background-color: #EEEEEE;
Expand Down
2 changes: 1 addition & 1 deletion drom.opam
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Do not modify, or add to the `skip` field of `drom.toml`.
opam-version: "2.0"
name: "drom"
version: "0.2.1"
version: "0.2.2"
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
synopsis:
"The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like user experience"
Expand Down
2 changes: 1 addition & 1 deletion drom.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "LGPL2"
min-edition = "4.07.0"
name = "drom"
synopsis = "The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like user experience"
version = "0.2.1"
version = "0.2.2"
windows-ci = true

# keys that you could also define:
Expand Down
2 changes: 1 addition & 1 deletion drom_lib.opam
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Do not modify, or add to the `skip` field of `drom.toml`.
opam-version: "2.0"
name: "drom_lib"
version: "0.2.1"
version: "0.2.2"
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
synopsis:
"The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like user experience"
Expand Down
28 changes: 28 additions & 0 deletions dune
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
as "skeletons/README.md")
( "share/drom/skeletons/packages/driver/files/dune_"
as "skeletons/packages/driver/files/dune_")
( "share/drom/skeletons/packages/driver/files/index.mld"
as "skeletons/packages/driver/files/index.mld")
( "share/drom/skeletons/packages/driver/files/main.ml"
as "skeletons/packages/driver/files/main.ml")
( "share/drom/skeletons/packages/driver/package.toml"
Expand All @@ -36,12 +38,24 @@
as "skeletons/packages/driver/skeleton.toml")
( "share/drom/skeletons/packages/library/files/dune_"
as "skeletons/packages/library/files/dune_")
( "share/drom/skeletons/packages/library/files/index.mld"
as "skeletons/packages/library/files/index.mld")
( "share/drom/skeletons/packages/library/files/main.ml"
as "skeletons/packages/library/files/main.ml")
( "share/drom/skeletons/packages/library/package.toml"
as "skeletons/packages/library/package.toml")
( "share/drom/skeletons/packages/library/skeleton.toml"
as "skeletons/packages/library/skeleton.toml")
( "share/drom/skeletons/packages/ppx_deriver/files/dune_"
as "skeletons/packages/ppx_deriver/files/dune_")
( "share/drom/skeletons/packages/ppx_deriver/files/index.mld"
as "skeletons/packages/ppx_deriver/files/index.mld")
( "share/drom/skeletons/packages/ppx_deriver/files/main.ml"
as "skeletons/packages/ppx_deriver/files/main.ml")
( "share/drom/skeletons/packages/ppx_deriver/package.toml"
as "skeletons/packages/ppx_deriver/package.toml")
( "share/drom/skeletons/packages/ppx_deriver/skeleton.toml"
as "skeletons/packages/ppx_deriver/skeleton.toml")
( "share/drom/skeletons/packages/program/files/dune_"
as "skeletons/packages/program/files/dune_")
( "share/drom/skeletons/packages/program/files/main.ml"
Expand All @@ -58,6 +72,18 @@
as "skeletons/projects/library/project.toml")
( "share/drom/skeletons/projects/library/skeleton.toml"
as "skeletons/projects/library/skeleton.toml")
( "share/drom/skeletons/projects/mini-lib/project.toml"
as "skeletons/projects/mini-lib/project.toml")
( "share/drom/skeletons/projects/mini-lib/skeleton.toml"
as "skeletons/projects/mini-lib/skeleton.toml")
( "share/drom/skeletons/projects/mini-prg/project.toml"
as "skeletons/projects/mini-prg/project.toml")
( "share/drom/skeletons/projects/mini-prg/skeleton.toml"
as "skeletons/projects/mini-prg/skeleton.toml")
( "share/drom/skeletons/projects/ppx_deriver/project.toml"
as "skeletons/projects/ppx_deriver/project.toml")
( "share/drom/skeletons/projects/ppx_deriver/skeleton.toml"
as "skeletons/projects/ppx_deriver/skeleton.toml")
( "share/drom/skeletons/projects/program/project.toml"
as "skeletons/projects/program/project.toml")
( "share/drom/skeletons/projects/program/skeleton.toml"
Expand Down Expand Up @@ -94,6 +120,8 @@
as "skeletons/projects/virtual/files/dot_ocamlformat-ignore")
( "share/drom/skeletons/projects/virtual/files/dot_ocp-indent"
as "skeletons/projects/virtual/files/dot_ocp-indent")
( "share/drom/skeletons/projects/virtual/files/dune-project_"
as "skeletons/projects/virtual/files/dune-project_")
( "share/drom/skeletons/projects/virtual/files/dune_"
as "skeletons/projects/virtual/files/dune_")
( "share/drom/skeletons/projects/virtual/files/sphinx/about.rst"
Expand Down
3 changes: 2 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
(name drom)
(allow_approximate_merlin)
(generate_opam_files false)
(version 0.2.1)
(version 0.2.2)
(formatting (enabled_for ocaml reason))

(package
Expand Down Expand Up @@ -37,3 +37,4 @@
odoc
ocamlformat
))

2 changes: 1 addition & 1 deletion share/drom/skeletons/packages/driver/skeleton.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "driver"
inherits = "virtual"

[file]
dune_ = { file = "dune" }
dune_ = { file = "dune", skips = [ "dune" ] }
"index.mld" = { skips = [ "docs" ] }
"main.ml" = { skips = [ "code" ] }

2 changes: 1 addition & 1 deletion share/drom/skeletons/packages/library/skeleton.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "library"
inherits = "virtual"

[file]
dune_ = { file = "dune" }
dune_ = { file = "dune", skips = "dune" }
"index.mld" = { skips = [ "docs" ] }
"main.ml" = { skips = [ "code" ] }

2 changes: 1 addition & 1 deletion share/drom/skeletons/packages/ppx_deriver/skeleton.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "ppx_deriver"
inherits = "virtual"

[file]
dune_ = { file = "dune" }
dune_ = { file = "dune", skips = [ "dune" ] }
"index.mld" = { skips = [ "docs" ] }
"main.ml" = { skips = [ "code" ] }

2 changes: 1 addition & 1 deletion share/drom/skeletons/packages/program/files/dune_
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![file:dune]; generated by drom from package skeleton 'driver'
; generated by drom from package skeleton 'driver'
(executable
(name main)
(public_name !{name})
Expand Down
5 changes: 5 additions & 0 deletions share/drom/skeletons/packages/program/skeleton.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[skeleton]
name = "program"
inherits = "virtual"

[files]
dune_ = { file = "dune", skips = [ "dune" ] }
"main.ml" = { skips = "code" }

2 changes: 1 addition & 1 deletion share/drom/skeletons/projects/virtual/files/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated by "drom project"
.PHONY: all build build-depsfmt fmt-check install dev-deps test
.PHONY: all build build-deps fmt fmt-check install dev-deps test
.PHONY: clean distclean

DEV_DEPS := merlin ocamlformat odoc![if:gen:test] ppx_expect ppx_inline_test![fi]
Expand Down
8 changes: 8 additions & 0 deletions share/drom/skeletons/projects/virtual/files/dune-project_
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(lang dune 2.0)
; This file was generated by drom, using drom.toml
(name !{name})
(allow_approximate_merlin)
(generate_opam_files false)
(version !{version})
(formatting (enabled_for ocaml reason))
!{dune-packages}
41 changes: 31 additions & 10 deletions share/drom/skeletons/projects/virtual/skeleton.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,28 @@ name = "virtual"

[file]
"Makefile" = { skips = [ "make" ] }
"dune-project_" = { file = "dune-project", skips = [ "dune" ] }

"dot_ocp-indent" = { file = ".ocp-indent", create = true, skips = [ "ocamlformat" ] }
"dot_ocp-indent" = {
file = ".ocp-indent", create = true,
skips = [ "ocamlformat" ] }

"dot_ocamlformat" = { file = ".ocamlformat", create = true, skips = [ "ocamlformat" ] }
"dot_ocamlformat-ignore" = { file = ".ocamlformat-ignore", skips = [ "ocamlformat" ] }
"dot_ocamlformat" = {
file = ".ocamlformat",
create = true,
skips = [ "ocamlformat" ] }
"dot_ocamlformat-ignore" = {
file = ".ocamlformat-ignore",
skips = [ "ocamlformat" ] }

"dot_github/workflows/workflow.yml" = { file = ".github/workflows/workflow.yml", skips = [ "github", "workflows" ] }
"dot_github/workflows/doc-deploy.yml" = { file = ".github/workflows/doc-deploy.yml", skips = [ "github", "workflows" ] }
"dot_github/workflows/workflow.yml" = {
file = ".github/workflows/workflow.yml",
skips = [ "github", "workflows" ] }
"dot_github/workflows/doc-deploy.yml" = {
file = ".github/workflows/doc-deploy.yml",
skips = [ "github", "workflows" ] }

"dog_gitignore" = { file = ".gitignore", skips = [ "git" ] }
"dot_gitignore" = { file = ".gitignore", skips = [ "git" ] }

"docs/index.html" = { skips = "docs" }
"docs/favicon.png" = { skips = [ "docs" ], subst = false }
Expand All @@ -21,21 +33,30 @@ name = "virtual"

"sphinx/about.rst" = { skips = [ "sphinx", "docs" ] }
"sphinx/conf.py" = { skips = [ "sphinx", "docs" ] }
"sphinx/under_static/css/fixes.css" = { skips = [ "sphinx", "docs" ], file = "sphinx/_static/css/fixes.css", create = true }
"sphinx/under_static/css/fixes.css" = {
skips = [ "sphinx", "docs" ],
file = "sphinx/_static/css/fixes.css",
create = true }
"sphinx/index.rst" = { skips = [ "sphinx", "docs" ] }
"sphinx/install.rst" = { skips = [ "sphinx", "docs" ] }
"sphinx/license.rst" = { skips = [ "sphinx", "docs" ] }

"docs/doc/index.html" = { skips = "docs", create = true }
"docs/sphinx/index.html" = { skips = "docs", create = true }

"test/expect-tests/dune_" = { file = "test/expect-tests/dune", skips = "test" }
"test/expect-tests/dune_" = {
file = "test/expect-tests/dune",
skips = [ "test", "dune" ] }
"test/expect-tests/test.ml" = { skips = "test" }

"test/inline-tests/dune_" = { file = "test/inline-tests/dune", skips = "test" }
"test/inline-tests/dune_" = {
file = "test/inline-tests/dune",
skips = [ "test" , "dune" ] }
"test/inline-tests/test.ml" = { skips = "test" }

"test/output-tests/dune_" = { file = "test/output-tests/dune", skips = "test" }
"test/output-tests/dune_" = {
file = "test/output-tests/dune",
skips = [ "test", "dune" ] }
"test/output-tests/test2.ml" = { skips = "test" }
"test/output-tests/test1.expected" = { skips = "test" }
"test/output-tests/test2.expected" = { skips = "test" }
Loading

0 comments on commit d20409c

Please sign in to comment.