Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
asarazan opened this issue Feb 5, 2021 · 2 comments

Comments

@asarazan
Copy link

asarazan commented Feb 5, 2021

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

  • ask run --debug --root=platforms/alexaSkill --index=src/index.ts
  • ...or something like ask run --debug --no-code && ts-node src/index.ts

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

  • ask-cli version: 2.22.4
  • Operating System and version: Mac OS Big Sur
  • Node.js version used for development: 12.16.1
  • NPM version used for development: 6.13.4
@asarazan asarazan changed the title Local Debugging: Custom source location (and/or ts-node support) Local Debugging: Custom root directory, custom entry-point, typescript support Feb 5, 2021
@sattpat sattpat self-assigned this Mar 31, 2021
@CamdenFoucht
Copy link
Contributor

CamdenFoucht commented Apr 28, 2022

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
Copy link

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: alexa/alexa-skills-kit-sdk-for-nodejs#666

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants