web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.2 KiB

  1. # dotenv-expand
  2. <img src="https://raw.githubusercontent.com/motdotla/dotenv-expand/master/dotenv-expand.png" alt="dotenv-expand" align="right" />
  3. Dotenv-expand adds variable expansion on top of
  4. [dotenv](http://github.com/motdotla/dotenv). If you find yourself needing to
  5. expand environment variables already existing on your machine, then
  6. dotenv-expand is your tool.
  7. [![BuildStatus](https://img.shields.io/travis/motdotla/dotenv-expand/master.svg?style=flat-square)](https://travis-ci.org/motdotla/dotenv-expand)
  8. [![NPM version](https://img.shields.io/npm/v/dotenv-expand.svg?style=flat-square)](https://www.npmjs.com/package/dotenv-expand)
  9. [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
  10. ## Install
  11. ```bash
  12. npm install dotenv --save
  13. npm install dotenv-expand --save
  14. ```
  15. ## Usage
  16. As early as possible in your application, require dotenv and dotenv-expand, and
  17. wrap dotenv-expand around dotenv.
  18. ```js
  19. var dotenv = require('dotenv')
  20. var dotenvExpand = require('dotenv-expand')
  21. var myEnv = dotenv.config()
  22. dotenvExpand(myEnv)
  23. ```
  24. See [test/.env](./test/.env) for examples of variable expansion in your `.env`
  25. file.