Comparing version 1.0.0 to 1.0.1
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7418
62