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 🙏

© 2026 – Pkg Stats / Ryan Hefner

stackconfig

v1.0.1

Published

The CDK Stack Config library is used to definde the two important parameters that will differentiate the stacks in your AWS Accounts. You can use this library and deploy the same stack to multiple environments or same environments with different name.

Downloads

14

Readme

CDK Stack Config for Stacks creates using CDK

The CDK Stack Config library is used to definde the two important parameters that will differentiate the stacks in your AWS Accounts. You can use this library and deploy the same stack to multiple environments or same environments with different name.

Installation

Using npm:

$ npm i -g npm
$ npm i stackconfig

You can also mention the same in your package.json in the devDependencies section and use npm install or yarn install to install the package as part of your build process:

devDependencies: {
    "stackconfig": "^1.0.0"
}

Parameters from the library

The parameters and context obtained from this library are as follows.

  • -c stackPrefix : A string that can be used as prefix for stack name and resources created in it
  • -c environment : Environment for which the stack is being deployed

The following are the predefined environments in the library

 default
 dev
 staging
 prod
 review
 test
 qa
 uat

Please contact the dev team if you need more environments.

Stack Context

Along with the parameters, this library relies on the Stack Context that is generated as part of CDK. The generated file will be named as cdk.context.json which contains information like:

  • AWS Account ID
  • AWS Default Region
  • AWS Default imported resources like VPC, Route53 HostedZone, etc

How to use in code

Classic import:

import { StackConfigService } from "stackconfig"

From the import in index.ts, the following can be used

const config = new StackConfigService().stackConfig;
const stackName = config.stackPrefix;
const stackEnv = config.environment;
const stackProps: StackProps = {
  env: {
    region: config.region,
    account: config.accountId,
  },
};

The cdk command will look like:

cdk synth/diff/deploy/destroy -c stackPrefix="my-stack" -c environment="dev"

Dependencies

The library relies on the AWS CLI and AWS CDK installation and configuration to be completed before using it. The Stack Context information are collected using the credentials and config in the .aws folder or from the exported variables in the terminal.

This is also dependent on the version of AWS CDK Library used. Currently, we support v2 of the AWS CDK.