create-uk-node-server 1.1.0 → 1.1.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/index.js +10 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -18,8 +18,14 @@ async function main() {
18
18
  type: "input",
19
19
  name: "projectName",
20
20
  message: "Enter the name of your project",
21
- default: "my-project"
22
- }
21
+ default: ""
22
+ },
23
+ {
24
+ type: "input",
25
+ name: "description",
26
+ message: "Enter the description of your project",
27
+ default: "A new nodejs project"
28
+ },
23
29
  ]);
24
30
 
25
31
  const templatePath = path.join(__dirname, "templates", answers.language.toLowerCase());
@@ -29,7 +35,8 @@ async function main() {
29
35
  if (err) return console.error(err)
30
36
  const pkgPath = path.join(projectPath, "package.json");
31
37
  const pkg = fs.readJsonSync(pkgPath);
32
- pkg.name = answers.projectName;
38
+ pkg.name = answers.projectName.toLowerCase() || process.cwd().replace(/\\/g, "/").split("/").pop().toLowerCase();
39
+ pkg.description = answers.description;
33
40
  fs.writeJsonSync(pkgPath, pkg, { spaces: 2 });
34
41
  console.log("Installing dependencies...")
35
42
  execSync(`cd ${projectPath} && npm install`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-uk-node-server",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "A CLI tool to quickly scaffold server projects with JavaScript or TypeScript templates",
5
5
  "main": "index.js",
6
6
  "scripts": {