This pull request contains several refactoring changes to improve the code quality and readability of the init, pkgFile, functions, and npm modules. The main changes are:
Simplify the code by using absolute paths, optional chaining, destructuring assignment, and inquirer.prompt with an array of questions, in the init module.
Optimize the package file generation code by using default values, map calls, and nullish coalescing operator in the pkgFile module.
Optimize the isEmptyDir and createFiles functions by using every, Promise.all, and pathJoin in the functions module.
Use get method from https module instead of request to simplify the code in the npm module.
Please review the changes and let me know if you have any feedback or suggestions.
This pull request contains several refactoring changes to improve the code quality and readability of the
init
,pkgFile
,functions
, andnpm
modules. The main changes are:inquirer.prompt
with an array of questions, in theinit
module.map
calls, and nullish coalescing operator in thepkgFile
module.isEmptyDir
andcreateFiles
functions by usingevery
,Promise.all
, andpathJoin
in the functions module.get
method fromhttps
module instead ofrequest
to simplify the code in thenpm
module.Please review the changes and let me know if you have any feedback or suggestions.