azure-functions-core-tools
azure-functions-core-tools copied to clipboard
Document --prefix and --script-root as cli options that are available to use from func start
Background
We are currently working on a TypeScript project where our code is laid out as following:
src/
FunctionOne/
- function.json
- index.ts
FunctionTwo/
- function.json
- index.ts
- host.json
- shared/*
- ...
And the corresponding output from the tsc compiler:
src/
FunctionOne/
- function.json
- index.js
FunctionTwo/
- function.json
- index.js
- host.json
- shared/*
- ...
However to get this approach working we had to navigate trough several issues and comments on this topic.
And to make our code work locally we had to prefix the func start
with --prefix dist
or otherwise we could also use --script-root dist
, but it seems that using --prefix
is the best option. These options have been available for a while but they are not documented and neither available from the CLI options for the func start
command.
- https://github.com/Azure/azure-functions-core-tools/issues/858
- https://github.com/Azure/azure-functions-core-tools/commit/50323beaaef1ad61dd0d4c13d7fe606d7cfec51c
Proposal
If these options are meant to be used it would be nice to have them documented or at least available from the CLI. I am open for making a contribution / PR, but would like your input on the topic first…
I think --prefix
and --script-root
might be equivalent. Makes sense to add it to the command help. @michaelpeng36 please let @cristobal know if this is something they can contribute to.
+ @ggailey777 to see if docs should be updated as well.
@cristobal Thanks for pointing this out! Yes, if you could add the documentation for both --prefix
and --script-root
in a PR, that would be fantastic.
@cristobal Thanks for pointing this out! Yes, if you could add the documentation for both
--prefix
and--script-root
in a PR, that would be fantastic.
Aight will look into it this week, sorry did not see this reply before now. Been a bit busy at work and drown in Github messages at work need to sort out the notifications here somehow 😂
Hello @cristobal, do u have some updates? Thx!
@andriimazur93 sorry been quite busy at work lately, i have some time off now. But will look into it and fix it next week. thanks for reminding me of this 👌👍