npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ask-deploy

v0.4.1

Published

Deploy wrapper for Alexa Skills Kit (ASK) to easily switch environments.

Downloads

19

Readme

ask-deploy

Creates needed config files and deploys using Amazon's ask-cli ask deploy

Install

  • nvm use 8.10.0 - latest version supported by Lambda
  • npm install -g ask-cli
  • npm install -g ask-deploy

Usage

ask-deploy <env> [options]

Options:

 -t, --target <target>      deploy "lambda", "model", "skill" or "all" (default: all)
 -P, --persistFiles         do not delete generated files
 -S, --skipAudioValidation  skip audio file validation
 -v, --version              output the version number of ask-deploy
 -h, --help                 output usage information

Setup

  • create config/env_name.yml
    • Lambda:
          ---
          skillName: 
          skillInvocation: 
          skillId: 
          lambdaArn:
          audioUrlPrefix:
    • Local:
          ---
          skillName: 
          skillInvocation: 
          skillId: 
          localUri:
          audioUrlPrefix: 
  • models/en-US.json
    • rename to models/en-US.json.tpl
    • update invocation to "invocationName": "{skillInvocation}"
    • delete models/en-US.env_name.json files
  • skill.json
    • rename to skill.json.tpl
    • update name to "name": "{skillName}"
    • update endpoint to "endpoint": {endpointObj}
    • delete skill.env_name.json files
  • .gitignore
    • add:
      # ask-cli config folder
      .ask
      /models/en-US.json
      /skill.json
      /config/*.yml
      !/config/dev.yml
      !/config/prod.yml
  • delete .ask directory

Audio URL Validation

Incorporating audio is an essential part of skill development. Audio URLs can be directly written into the strings file, however this can become a nuisance as URLs are often long. To simply this, we use the alexa-toolkit library and include our audio references in the strings file as follows: <audio>welcome.mp3</audio> . When a response is sent to the alexa-sdk, alexa-toolkit preprocess the string. It updates any audio tags by prepending a URL (defined in our environment variables) resulting in a string with fully formed SSML audio tags.

When incorporating many audio tags into your strings file, it can be time consuming to verify if all the URLs are pointing to live files. To help with this, ask-deploy has a built in mechanism that verifies the existence of all audio tags within your strings file. Simply include the audioUrlPrefix variable in your configuration file, and when you run ask-deploy it will make sure all audio tags are pointing to a live remote file ensuring your skill doesn't unexpectedly crash.