alexa / ask-cli

Alexa Skills Kit Command Line Interface
https://developer.amazon.com/en-US/docs/alexa/smapi/ask-cli-intro.html
Apache License 2.0
167 stars 54 forks source link

Local Debugging: Custom root directory, custom entry-point, typescript support #376

Open asarazan opened 3 years ago

asarazan commented 3 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[X] Feature request
[ ] Documentation issue or request 
[ ] Other... Please describe: 

I don't seem able to make local debugging work in non-standard environments. I should note that Volley's stack includes a combination of the Jovo framework for building, and a completely custom engine involving Typescript+Express at runtime.

This means that the location of the alexa metadata, including ask-resources.json is in /platforms/alexaSkill, and the entry-point is in src/index.ts.

It would be cool if I could execute ask run with a custom path to the folder containing ask-resources.json, and also a way to either invoke ts-node against a custom index.ts, or point directly to that source file and have ask determine to run the typescript toolchain.

Alternately I could also point it at the dist/ folder where the compiled javascript resides.

Expected Behavior

I should be able to do something like

Current Behavior

Certain parts of ask seem to be tightly coupled to the "standard" project layout, which locks custom tech out of local debugging. (I should note that we have been able to work around these problems over on the vscode/extension side)

Your Environment and Context

CamdenFoucht commented 2 years ago

Thank you for the feature request! We will look into adding this feature to the cli. We currently have some other tasks with higher priority, but this would be nice to have added to the run command if we can support it.

vmwxiong commented 2 years ago

Sweet! Super happy to see y'all are open to this. Just FYI @CamdenFoucht, this PR is a hacky attempt to solve this that we're still using today: https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/pull/666