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

slak

v1.0.2

Published

Generator for a Serverless application using Typescript on AWS Lambda

Downloads

2

Readme

the Serverless App Kit

Cousin of Rak, Slak bootstraps a Serverless project for building Lambda functions with Typescript in a joyous environment.

Features include:

  • TypeScript, for safe programming
  • TSLint and Prettier, to promote good code style
  • Jest, for unit testing
  • TS-Node, for debugging
  • Webpack, to bundle your functions
  • Serverless, to manage deployment and provisioning
  • Node 12 LTS, for the fastest startup and execution possible
  • N|Solid, for profiling in production with minimal overhead
  • Builtin logging utils and project structure for getting moving fast

Start a Slak project

It's easiest to use Slak with npx - that way, you won't need to install any dependencies to get started. In an empty folder, run:

npx slak my-new-project-name

Slak will template out the files you need for your application and install its dependencies.

Contribute changes to Slak

Most of the files in this repository are templates. To make changes to the app that Slak sets up for you initially, the recommended workflow is to run Slak to template those files out into a real app, make the changes and test them, and then convert the built files back into templates using hygen-create. The basic workflow looks like:

  1. Template out a new Slak app

     npx slak my-new-lambda
  2. Make some changes in the templated app, e.g., adding a new util file

     echo "module.exports = {};" > src/utils/newUtil.ts
  3. Make hygen-create aware of the new file

     npx hygen-create add src/utils/newUtil.ts
  4. Generate the templates again, merging them with the existing ones at the location you specify

     yarn upstream ~/code/slak/_templates

This works because Slak adds a hygen-create.json to the templated app, marking it as a hygen-create project in-session. Don't delete this file.

Executing tasks on the templates

It's possible to run anything you would normally run as a yarn run command on the templates without creating a new project first using the yarn tpl command. tpl sets up a new project in a /tmp directory, then invokes yarn run there. For example, to run the package.json-defined test script on the current state of the templates:

yarn tpl test

This command will even clean up the /tmp folder after.

Making changes and executing tasks

Combining the two above processes is easy, if you want to run a command on the files that the template would produce and then save file changes effected by that command back to the templates. Simply pass the --upstream argument to yarn tpl, e.g.:

yarn tpl upgrade-interactive --latest --upstream

After selecting packages to upgrade, this command would update the template versions of package.json and yarn.lock.