designsystemsinternational / mechanic

Mechanic is a framework to build assets built on web code.
https://mechanic.design
MIT License
251 stars 11 forks source link

mechanic serve --port does not override mechanic.config.js #166

Closed puria closed 1 year ago

puria commented 1 year ago

Describe the bug The mechanic serve command has an option name --port that states in the help:

      --port        Custom port to serve app                     [default: 3000]

so by running mechanic serve --port 3030 I would expect to be served over the 3030 port but it's override by the value that is defined in mechanic.config.js

To Reproduce Steps to reproduce the behavior:

  1. create a new mechanic project
  2. run mechanic serve --port 3030

Expected behavior

I do expect that the --port overrides the .config file and or remove the option entirely to not have confusion on duplicate entry point for the same option. Even if the very preferable way would be to be able to define it via ENV variables, since in different environments the port could change, and should not leverage on a source tracked file.

Additional context I'm super sorry reporting many things, just put them here because I belive that the project has a huge potential, and a reminder to myself, for future contributions (:

fdoflorenzano commented 1 year ago

Hey there @puria ! Again as in #165, sorry for the delay, (and the auto-closing). And, thanks! again!