Hi Amper team, right now, our multiplatform CLI ne...
# amper
s
Hi Amper team, right now, our multiplatform CLI needs a separate module for each OS target because the product type has to be explicit. But if we’re using all multiplatform libraries and don’t need any target-specific customizations, does it make sense to just have a single
native/app
product type? This will make the project structure a lot simpler for small cli apps
Copy code
├── jvm-cli
│   └── module.yaml
├── linux-cli
│   └── module.yaml
├── macos-cli
│   └── module.yaml
├── project.yaml
├── shared
│   ├── module.yaml
│   ├── src
│   ├── src@jvm
│   ├── src@linux
│   ├── src@macos
│   ├── src@mingw
│   └── test
└── windows-cli
    └── module.yaml
j
Hi Suresh! I get where this is coming from. We've discussed this a few times, and it's a design decision to have separate modules for separate products. You're technically building several different applications here, that ultimately will be packaged and published differently, even though they share almost all their code. It simplifies a lot the project model to reason about these applications as different modules. Also, modules in Amper should be very cheap to create, just one extra module file, possibly 3 lines long.
👍 1
thank you color 1