alexa / alexa-skills-kit-sdk-for-nodejs

The Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Apache License 2.0
3.12k stars 735 forks source link

Keep Compiled code in a dist folder #724

Open swalker326 opened 1 year ago

swalker326 commented 1 year ago

I'm submitting a...


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

I've created an alexa skill built in typescript and in trying to compile it to js and keep my sanity I wanted to set the entry point in package.json and enable to lambda function to be correctly routed to a different directory IE: /dist/index.js

Expected Behavior

Setting the main property in package.json to the location of my entry file would still allow the function to run.

Current Behavior

Changes to the main property seem to have no affect

Possible Solution

This could be something I'm doing wrong, or not a limitation of the sdk but of aws lambda functions themselves. I can't seem to find any information on the topic.

Steps to Reproduce (for bugs)

Create a sample skill and move your index.js file to a nested directory and update the package.json to reflect these changes.

Context

When trying to write a skill in typescript the root directory of the lambda function can become cluttered very quickly. I would like to have my .ts files in a /src directory and my compiled .js files in a /dist directory.

Your Environment