create-javascript-project
Advanced tools
Comparing version 1.7.0 to 1.8.0
@@ -14,3 +14,5 @@ "use strict"; | ||
const answers = await inquirer_1.collectAnswers(); | ||
if (answers.configurations.includes("flow") || answers.framework !== "none") { | ||
if (answers.configurations.includes("flow") || | ||
answers.typescript || | ||
answers.framework !== "none") { | ||
answers.module = "esm"; | ||
@@ -17,0 +19,0 @@ } |
@@ -56,5 +56,11 @@ "use strict"; | ||
{ | ||
type: "confirm", | ||
name: "typescript", | ||
message: "Does your project use TypeScript?", | ||
when: (answers) => !answers.configurations.includes("flow"), | ||
}, | ||
{ | ||
type: "list", | ||
name: "module", | ||
message: "What type of modules does your project use?", | ||
message: "What type of module does your project use?", | ||
choices: [ | ||
@@ -64,12 +70,7 @@ { name: "JavaScript modules (import/export)", value: "esm" }, | ||
], | ||
when: (answers) => !answers.configurations.includes("flow") && answers.framework === "none", | ||
when: (answers) => !answers.configurations.includes("flow") && | ||
!answers.typescript && | ||
answers.framework === "none", | ||
}, | ||
{ | ||
type: "confirm", | ||
name: "typescript", | ||
message: "Does your project use TypeScript?", | ||
when: (answers) => !answers.configurations.includes("flow") && answers.module !== "commonjs", | ||
default: (answers) => answers.framework !== "none", | ||
}, | ||
{ | ||
type: "checkbox", | ||
@@ -76,0 +77,0 @@ name: "environment", |
{ | ||
"name": "create-javascript-project", | ||
"description": "Keep you away from boring procedures for new JavaScript/TypeScript project", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"author": "Khánh Hoàng @hckhanh", | ||
@@ -6,0 +6,0 @@ "bin": { |
@@ -43,3 +43,3 @@ # create-javascript-project | ||
$ create-javascript-project (-v|--version|version) | ||
create-javascript-project/1.7.0 linux-x64 node-v14.16.0 | ||
create-javascript-project/1.8.0 linux-x64 node-v14.16.0 | ||
$ create-javascript-project --help [COMMAND] | ||
@@ -46,0 +46,0 @@ USAGE |
48358
1083