Socket
Socket
Sign inDemoInstall

@37bytes/prepare-environment

Package Overview
Dependencies
Maintainers
6
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@37bytes/prepare-environment

Utility to prepare the environment for a React application. Useful for CI.


Version published
Weekly downloads
46
decreased by-9.8%
Maintainers
6
Weekly downloads
 
Created
Source

Usage

  1. prepare-environment ENV_NAME=stage In this case app looking for .environmentrc automatically. The file must be located in the root.

  2. prepare-environment ENV_NAME=stage CONFIG_PATH=configs/.environmentrc
    In this case app get .environmentrc file from the custom path.

Optional parameters default values

  • CONFIG_PATH = /,

Local developing

  1. create ./environments/.env.stage (env file must match ENV_NAME=stage)
  2. ts-node src/index.ts <...>
  3. npm run build&watch; node build/index.js <...>
  4. npm run build; chmod +x build/index.js; npm link; prepare-environment <...>
  5. example: ts-node src/index.ts CONFIG_PATH=__fixtures__/.environmentrc ENV_NAME=stage

version history

2.0.0

  • Elimination of allowedEnvironments. Instead, available environments are computed from the environments folder.
  • Added 'isEnvironmentExists' function in utils. The function takes parameters: targetEnvironment - the name of the environment, and pathToEnvironmentsFolder - the path to the folder containing the environments. The function checks for the presence of the .env.targetEnvironment file in the environments folder.
  • fix for environment name check

1.0.4

  • refactoring the script version

1.0.3

  • refactoring utils and main script

1.0.2

  • update .npmignore

1.0.1

  • fix small bugs

1.0.0

  • first version

FAQs

Package last updated on 21 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc