drom
drom copied to clipboard
Skeleton project with no package
Is there any way to write a skeleton for a project which does not automatically generate a package inside src
with the name of the project? Thanks!
The ´virtual’ skeleton might be what you are looking for.
Le ven. 29 janv. 2021 à 21:48, tachukao [email protected] a écrit :
Is there any way to write a skeleton for a project which does not automatically generate a package inside src with the name of the project? Thanks!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OCamlPro/drom/issues/126, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD5XDM27R2P7SU7L75QKGLS4MNI5ANCNFSM4WZQKFIA .
-- Fabrice LE FESSANT Chercheur en Informatique INRIA Paris Rocquencourt -- OCamlPro Programming Languages and Distributed Systems
@lefessan thanks for the fast reply.
I tried creating the following test
project and package skeletons:
packages/test/skeleton.toml:
[skeleton]
name = "test"
packages/test/package.toml:
name = "!{name}"
skeleton = "test"
kind = "virtual"
projects/test/skeleton.toml:
[skeleton]
name = "test"
projects/test/drom.toml:
[project]
drom-version = "0.1.0"
[project]
authors = [ !{authors-for-toml} ]
copyright = "!{copyright}"
name = "!{name}"
synopsis = "The !{name} project"
version = "0.1.0"
[drom]
skip = ""
[project]
skip-dirs = []
[[package]]
skeleton = "test"
kind = "virtual"
name = "!{name}"
When I then run drom new test --skeleton=test
, I get the following directory structure:
└── test/
├── .drom (drom state, do not edit)
├── drom.toml <────────── project config EDIT !
└── src/
└── test/
└── package.toml <────────── package config EDIT !
Ideally, I would like to get
└── test/
├── .drom (drom state, do not edit)
└── drom.toml <────────── project config EDIT !
Is that possible? thanks!
I see two ways to avoid this : one is just to not add a package.toml
file in your project, have no predefined package. The second one is to set the dir
variable in the package.toml
file to something different, i.e. "." for example.
The second method works for me thanks! It still creates a package.toml
file in .
but that will work.
The first method was a bit confusing to me. I never had a package.toml
inside the test
project. However, removing it from within the test
package doesn't seem to work either as a package.toml
file is still created. In any case, I'm happy with the second method, thanks again!