Package Exports
- ask-utils
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ask-utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ASK-Utils - Utility functions for ask-sdk

Getting started
$ npm i -S ask-utilsPackages
Skill Builder (Beta)
We can easy to create your own skill builder
import {
createSkill,
SkillHandlersFactory
} from 'ask-utils'
// can get skill constancts by request attributes
const ExampleHandler = {
canHandle: () => true,
handle: handlerInput => {
const { CONSTANTS } = handlerInput.attributesManager.getRequestAttributes()
return handlerInput.responseBuilder
.speak(`Welcome to the ${CONSTANTS.SKILL_NAME}!`)
.getResponse()
}
}
const handlers = SkillHandlersFactory.create()
.addRequestHandlers(
LaunchRequest,
NextIntent,
AnswerIntent,
YesNextIntent,
HelpIntent,
ResumeIntent,
StopIntent,
NoIntent,
CancelIntent,
FallBackIntent
)
.addRequestInterceptors(
MyRequestInterceptor1,
MyRequestInterceptor2,
)
.addResponseInterceptors(
MyResponseInterceptor1,
MyResponseInterceptor2,
)
.addErrorHandlers(
MyErrorHandler1,
MyErrorHandler2,
)
export const handler = createSkill({
persistanceType: 'S3',
bucketName: process.env.BUCKET_NAME as string,
bucketPathPrefix: process.env.PATH_PREFIX as string,
isISP: true,
constants: {
SKILL_NAME: 'My Awesome Skill'
}
}, handlers.getHandlers())
.lambda()development
$ git clone git@github.com:hideokamoto/ask-utils.git
$ cd ask-utils
$ yarn
$ yarn bootstraptest
$ npm testLint
$ npm run lint
or
$ npm run lint -- --fixHistory
-> Release Note
Contributors
| Name | Version |
|---|---|
| @ArtskydJ | v0.13.0 |
