Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gui-environment

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gui-environment

The gui-environment package is a command-line tool that simplifies managing environment variables for your application. Easily set up different configurations based on your build mode (development or production) for a smooth development workflow.

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
0
Weekly downloads
 
Created
Source

GUI Environment

The gui-environment package is a command-line tool that simplifies managing environment variables for your application. Easily set up different configurations based on your build mode (development, staging or production) for a smooth development workflow.


Getting Started

Install the package:

$ npm install -D gui-environment

Initialize your project's environment:

$ npx gui-environment --init

# Using a custom source path
$ npx gui-environment --src="custom-src" --init

Include the gui-environment binary in your package.json file:

...
"scripts": {
  "build-dev": "gui-environment --development && tsc && ...",
  "build-staging": "gui-environment --staging && tsc && ...",
  "build-production": "gui-environment --production && tsc && ...",

  // Using a custom source path
  "build-dev": "gui-environment --src='custom-src' --development && tsc && ...",
}
...

Output Example

project
    │
    src/
    │  ├───components/
    │  │         └───...
    │  ├───environment/
    │  |         ├───environment.development.ts
    │  |         ├───environment.production.ts
    │  |         ├───environment.staging.ts
    │  |         ├───environment.ts
    │  |         └───types.ts
    │  └───main.tsx
    │
    package.json
    tscofig.json
    ...

Usage

Once initialized, include your environment variables in the following files accordingly:

  1. environment.development.ts

  2. environment.production.ts

  3. environment.staging.ts

Use the environment variables anywhere:

// main.tsx
import { ENVIRONMENT } from './environment/environment.ts';

ENVIRONMENT
// {
//    production: false,
//    version: '1.0.0'
// }

Important: keep in mind that whatever data you include in these files will be public when your app is deployed. Avoid sharing sensitive information such as API keys, secrets, etc...


Built With

  • TypeScript

Running the Tests

# Unit Tests
$ npm run test:unit

# Integration Tests
$ npm run test:integration

License

MIT


Acknowledgments


Deployment

Install dependencies:

$ npm install

Build the project:

$ npm start

Publish to npm:

$ npm publish

Keywords

FAQs

Package last updated on 25 Jun 2024

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