eik-lib / cli

CLI to publish packages and import maps to Eik, and to manage aliases
https://eik.dev
1 stars 3 forks source link

Add an option to pass in a path to a config #553

Closed wkillerud closed 3 months ago

wkillerud commented 6 months ago

Use case: publish images or other somewhat stable assets with a different Eik config. Versioned and published separately from the application code.

The CLI would need to support a -c/--config flag for relevant commands (version and publish at least).

digitalsadhu commented 3 months ago

Should the cwd then be the directory you are running the command in, or the root of the provided config file? Presumably the directory you are running the command from or the cwd as provided by the --cwd flag? Or not? Currently the cwd is set to be the root of the config file, whether that is package.json or eik.json, and the files config option is usually relative which means relative to the location of the config file.

wkillerud commented 3 months ago

Good question. I think cwd would be the directory of the config file given to -c, not process.cwd(). That way the file paths in the config are relative to the config file.