Comments (3)
Hey @andrelandgraf , sorry for the late response. So as you may already know, the Alexa Console built-in repository
is just the normal AWS Lambda function over an AWS CodeCommit repository for the skill, handled by the Hosted skills service. AWS Lambda doesn't currently support Typescript out of the box, and the developers are expected to build the .ts
files to .js
files before uploading to the service. This is the reason why you would still need to upload the dist
directory containing the js
files.
Additionally, the default handler location for the AWS Lambda function for the hosted skills service is index.handler
and at the moment, that service doesn't provide a way to configure this handler through the tools. This is the reason why you would have to re-import the handler from dist/index
and export it back again, in your workaround. You can also configure your tsconfig.json
to output the built files to the same lambda
folder, and hence not do such workarounds. However, that would add both js
and ts
files in the same folder, leading to confusion and maintainability issues. I think your workaround is a good one, until the hosted skill service provides a way to configure the handler location.
As for the sample skill, it seems to have been built on the ask cli v1
structure. If so, skill devs can use this migration guide, to convert it to the ask cli v2
structure, which is compatible with the ASK Toolkit
vscode extension. Hope this helps.
I am going ahead and closing this issue, considering you are unblocked at the moment. Please create an issue in case you have further questions or have any feedback on the extension. Thanks.
from ask-toolkit-for-vscode.
I was able to make it work now.
- I added the
dist
folder to git and deploy it to lambda using Alexa Skills Toolkit - I added a
index.js
insidelambda/
which just looks like follows:
const handler = require('./dist/index')
exports.handler = handler
Is this how TypeScript is supposed to work with Alexa Skills Toolkit or is there a better way to configure it?
from ask-toolkit-for-vscode.
Thanks @nikhilym for the in-depth explanations! This cleared up a lot of assumptions I made. Great to hear that you recommend my workaround for now.
from ask-toolkit-for-vscode.
Related Issues (20)
- hello who are you HOT 2
- CyberAlex HOT 2
- Unable to receive events for Reminders/Skill enable or disable for Alexa Hosted Skill HOT 2
- Consistent Undefined Response for Alexa Simulator HOT 5
- GitHub repository problem using alexa in visual studio code HOT 8
- Error while trying to register a device for skill testing in VS Code HOT 3
- How to do shared development of an open source Alexa Skill on GitHub? HOT 1
- Not able to hook local simulator or ask-cli simulator to the local debugger HOT 5
- Closed issue 277 is still an issue HOT 1
- Add full support for Arabic locale (ar-SA)
- Various operations result in a Git error "No skill repository found"
- "There is no interaction model for en-US. Select a different locale." HOT 5
- duture
- local debugging of skills using persistent storage not working HOT 3
- Ability to pull and edit widget artifacts
- Support for download and editing of APLA documents. HOT 1
- Ability to download all of a skill's APL documents
- Error occurred while trying to debug Alexa Skill using ASK Toolkit in Python environment on VSCode HOT 9
- n
- Skill clone failed. Reason: Git folder setup failed HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ask-toolkit-for-vscode.