Skip to content

--server config with --dest option does not work as expected #97

@swudged

Description

@swudged

I've started using preact-cli and have come across a couple of issues when trying to out the server config into a firebase.json file. The issues are:

  1. When calling the serve command, options.dest is not being passed to the config server method - as can be seen here.
  2. In the check to see if the dest option is a directory, options.dest is not being passed to the fs.stat function - here.
  3. dir is not being set correctly if you have been able to get into this block
  4. If the above is fixed an exception is thrown.

On top of this - in addition to allowing '-' to be pased into the --dest option, would it be useful to also allow '.' to signify the cwd and a filename of firebase.json?

Finally, would it be desirable to use fs-extra and write a key of hosting with the config object rather than writing a file that contains that object? Currently my config that was generated by Firebase's CLI tools would be overridden and when I deploy my config would be incorrect. This would make it much easier to work with Firebase's CLI tools and preact-cli at the same time.

Happy to PR this but wanted to get thoughts before I went ahead with the changes.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions