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

@nodenv/nodenv-vars

v1.2.0

Published

A nodenv plugin that safely sets global and per-project environment variables

Downloads

2

Readme

nodenv-vars

This is a plugin for nodenv that lets you set global and project-specific environment variables before spawning Node processes.

Installation

To install nodenv-vars, clone this repository into your $(nodenv root)/plugins directory. (You'll need a recent version of nodenv that supports plugin bundles.)

$ mkdir -p $(nodenv root)/plugins
$ cd $(nodenv root)/plugins
$ git clone https://github.com/nodenv/nodenv-vars.git

Usage

Define environment variables in an .nodenv-vars file in your project, one variable per line, in the format VAR=value. For example:

HUBOT_CAMPFIRE_ACCOUNT=nodenv
HUBOT_CAMPFIRE_TOKEN=somerandomtoken
HUBOT_CAMPFIRE_ROOMS=some,campfire,rooms

You can perform variable substitution with the traditional $ syntax. For example, to append to HUBOT_CAMPFIRE_ROOMS:

HUBOT_CAMPFIRE_ROOMS=$HUBOT_CAMPFIRE_ROOMS:some,extra,rooms

You may also have conditional variable assignments, such that a variable will only be set if it is not already defined or is blank:

USER_ID?=OiNutter

In the above case, USER_ID will only be set if $USER_ID is currently empty (i.e., if [ -z "$USER_ID" ] is true).

Spaces are allowed in values; quoting is not necessary. Expansion and command substitution are not allowed. Lines beginning with # or any lines not in the format VAR=value will be ignored.

Variables specified in the $(nodenv root)/vars file will be set first. Then variables specified in .nodenv-vars files in any parent directories of the current directory will be set. Variables from the .nodenv-vars file in the current directory are set last.

Use the nodenv vars command to print all environment variables in the order they'll be set.

Credits

Forked from Sam Stephenson's rbenv-vars by Will McKenzie and modified for nodenv.