make-json-to-env 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +103 -0
  2. package/package.json +19 -3
package/README.md ADDED
@@ -0,0 +1,103 @@
1
+ Since you requested the `.md` file, here is the raw Markdown code for your **`README.md`**. You can copy and paste this directly into your project.
2
+
3
+ I’ve optimized the formatting to make it look professional on the npm registry page.
4
+
5
+ ```markdown
6
+ # make-json-to-env 🚀
7
+
8
+ A lightweight CLI tool to transform your `JSON` configuration files into `.env` templates instantly. Perfect for generating `.env.example` files without manual typing.
9
+
10
+ ---
11
+
12
+ ## 📦 Installation
13
+
14
+ You can run it directly without installing using `npx`:
15
+
16
+ ```bash
17
+ npx make-json-to-env <filename.json>
18
+
19
+ ```
20
+
21
+ Or install it globally to use the command anywhere:
22
+
23
+ ```bash
24
+ npm install -g make-json-to-env
25
+
26
+ ```
27
+
28
+ ## 🛠 Usage
29
+
30
+ Once installed, use the `convert-json-env` command followed by your JSON file:
31
+
32
+ ### Basic Conversion
33
+
34
+ ```bash
35
+ convert-json-env config.json
36
+
37
+ ```
38
+
39
+ *This will create a `config.env` file in the same directory.*
40
+
41
+ ### With a Prefix
42
+
43
+ Use the `--prefix` flag to prepend strings to every line (useful for shell scripts or specific frameworks).
44
+
45
+ ```bash
46
+ convert-json-env firebaseConfig.json --prefix="export "
47
+
48
+ ```
49
+
50
+ ---
51
+
52
+ ## 📋 Example
53
+
54
+ **Input (`example.json`):**
55
+
56
+ ```json
57
+ {
58
+ "apiKey": "12345",
59
+ "authDomain": "app.firebaseapp.com",
60
+ "projectId": "my-app"
61
+ }
62
+
63
+ ```
64
+
65
+ **Command:**
66
+
67
+ ```bash
68
+ convert-json-env example.json --prefix="export "
69
+
70
+ ```
71
+
72
+ **Output (`example.env`):**
73
+
74
+ ```env
75
+ export APIKEY=
76
+ export AUTHDOMAIN=
77
+ export PROJECTID=
78
+
79
+ ```
80
+
81
+ ---
82
+
83
+ ## ✨ Features
84
+
85
+ * **No Dependencies:** Light as a feather, uses native Node.js modules.
86
+ * **Smart Naming:** Automatically generates the output filename based on your input.
87
+ * **Case Formatting:** Automatically converts keys to `UPPER_CASE` for standard `.env` compliance.
88
+ * **Security First:** Helps you create `.env.example` files so you never accidentally commit your real secrets.
89
+
90
+ ## 📄 License
91
+
92
+ [MIT](https://www.google.com/search?q=LICENSE)
93
+
94
+ ```
95
+
96
+ ---
97
+
98
+ ### One last tip before you publish:
99
+ Make sure your `package.json` has the **description** and **keywords** filled out. This helps people find your package when they search on npm.
100
+
101
+ **Would you like me to generate a standard MIT `LICENSE` file text for you as well?**
102
+
103
+ ```
package/package.json CHANGED
@@ -1,12 +1,28 @@
1
1
  {
2
2
  "name": "make-json-to-env",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Generates a template .env.example from a config.json file",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "make-json-to-env": "./index.js"
8
8
  },
9
- "keywords": ["env", "json", "converter", "template"],
9
+ "keywords": [
10
+ "env",
11
+ "json",
12
+ "converter",
13
+ "template",
14
+ "dot-env",
15
+ "environment-variables",
16
+ "config-to-env",
17
+ "cli",
18
+ "devtools",
19
+ "automation",
20
+ "boilerplate",
21
+ "env-example",
22
+ "dotenv-generator",
23
+ "configuration",
24
+ "secrets-management"
25
+ ],
10
26
  "author": "Your Name",
11
27
  "license": "MIT"
12
- }
28
+ }