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

dotenv2env

v1.0.5

Published

dotenv2env is a command line tool that loads environment variables from a .env file and runs a script with those variables as part of the environment. It supports both npm and yarn package managers.

Downloads

9

Readme

dotenv2env

dotenv2env is a command line tool that loads environment variables from a .env file and runs a script with those variables as part of the environment. It supports both npm and yarn package managers.

A good use for this library is in conjunction with the babel-plugin-transform-inline-environment-variables, which enables you to inline environment variables directly into your code during the build process.

Here is an example of how to use dotenv2env with babel-plugin-transform-inline-environment-variables and expo

npx dotenv2env start

Usage

To use dotenv2env, run the following command:

npx dotenv2env <script-name> [options]

The following options are available:

--useFile : Use the specified file as the source of environment variables. Defaults to .env.

--useVerbose: Enable verbose logging.

--useYarn: Use yarn as the package manager instead of npm.

In addition to these options, the user can pass other flags that will be forwarded to the script execution.

Example

To run a script named start with environment variables from a .env file using npm, run the following command:

npx dotenv2env start

To run the same script using yarn instead of npm, run the following command:

npx dotenv2env start --useYarn

To use a different file name for the environment variables, run the following command:

npx dotenv2env start --useFile env.prod

Please note that the --useFile, --useVerbose, and --useYarn parameters are reserved for the library, and all other flags that are passed will be forwarded to the script execution.

License

dotenv2env is licensed under the MIT License.

Show your support

Give a ⭐️ if this project helped you!

:memo: License

dotenv2env is licensed under the MIT License.


Made with ♥ by Godrix :wave: Get in touch!