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

envample

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

envample - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

bin/run.js

@@ -9,3 +9,3 @@ #!/usr/bin/env node

if (isHelp) {
process.stdout.write(`Usage: envample [.env] [.env.example], defaults to .env and .env.example is no arguments are provided`);
console.info(`Usage: envample [.env] [.env.example], defaults to .env and .env.example is no arguments are provided`);
return Promise.resolve();

@@ -12,0 +12,0 @@ }

{
"name": "envample",
"version": "1.0.0",
"version": "1.0.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "bin": "bin/run.js",

# envample
Generates .env.example or .env.* file from your .env file.
This a quick way to keep your .env file and your .env.example file in sync.

@@ -12,2 +13,8 @@

or in your project
```sh
npm i -D envample
```
## Usage

@@ -17,2 +24,5 @@

envample .env .env.example
#OR
npx .envample .env .env.example
```

@@ -25,3 +35,30 @@

Lines preceded with `#example` comment will be copied as is.
Lines preceded with `#example=value` comment will be copied with the value replaced by the specified value
Lines not preceded by an `#example` comment will be copied without the value
All comments will be preserved
## Example
.env
```sh
GIT=true
# example=false
DEBUG=true
SECRET=secret
# just a comment
```
.env.example
```sh
# example
GIT=true
# example=false
DEBUG=false
SECRET=
# just a comment
```

@@ -48,3 +48,3 @@ "use strict";

.on('close', () => {
process.stdout.write(`🎉 ${envExampleFile} generated from ${envFile} 🚀`);
console.info(`🎉 ${envExampleFile} generated from ${envFile} 🚀`);
(0, fs_1.writeFileSync)(envExampleFile, envs.join('\r\n'), 'utf8');

@@ -51,0 +51,0 @@ return res(null);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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