@bunlime/create-folder 1.0.0

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/index.js +16 -0
  2. package/package.json +23 -0
package/index.js ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+ const fs = require("fs");
3
+ const path = require("path");
4
+
5
+ // The folders you want to create
6
+ const folders = ["models", "controllers", "config", "services"];
7
+
8
+ folders.forEach((folder) => {
9
+ const dir = path.join(process.cwd(), folder);
10
+ if (!fs.existsSync(dir)) {
11
+ fs.mkdirSync(dir);
12
+ console.log(`✅ Created: ${folder}`);
13
+ } else {
14
+ console.log(`⚠️ Exists: ${folder}`);
15
+ }
16
+ });
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@bunlime/create-folder",
3
+ "version": "1.0.0",
4
+ "description": "A CLI tool to scaffold Express project folders",
5
+ "main": "index.js",
6
+ "files": [
7
+ "index.js"
8
+ ],
9
+ "bin": {
10
+ "create-folder": "./index.js"
11
+ },
12
+ "scripts": {
13
+ "test": "echo \"Error: no test specified\" && exit 1"
14
+ },
15
+ "keywords": [
16
+ "express",
17
+ "scaffold",
18
+ "cli"
19
+ ],
20
+ "author": "",
21
+ "license": "ISC",
22
+ "type": "commonjs"
23
+ }