diff --git a/CHANGELOG.md b/CHANGELOG.md index 23b080b..4420d8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.9.0] - 2020-06-01 + +### 📝 Clerical Adjustments + +### Added + +- Added [siliconeidolon](https://github.com/siliconeidolon) to acknowledgements +- Comments on `verifyNodeVersion()` + +### Changed + +- New user directory at success message is now also in blue +- Update README +- Update GIFs + +### Removed + +### Fixed + ## [0.8.0] - 2020-06-01 ### ✏️ Shell Option @@ -20,6 +39,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- [#8 - ENOENT](https://github.com/alexlee-dev/create-cli-application/issues/8) + ## [0.7.0] - 2020-06-01 ### ✏️ Better Logging diff --git a/README.md b/README.md index 181a96b..0383fa3 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,9 @@ I generally use a template when developing CLI applications for myself. I want t ### OS -[x] MacOS -[x] Linux -[ ] Windows (Currently unstable. Attempting to fix) +- [x] MacOS +- [x] Linux +- [x] Windows ### Installing @@ -76,11 +76,13 @@ You can choose to use the application in an interactive mode by passing the flag - [boxen](https://github.com/sindresorhus/boxen) - Create boxes in the terminal. - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right. - [clear](https://github.com/bahamas10/node-clear) - Clear the terminal screen if possible. +- [commander](https://github.com/tj/commander.js) - Node.js command-line interfaces made easy. - [configstore](https://github.com/yeoman/configstore) - Easily load and persist config without having to think about where and how. - [fs-extra](https://github.com/jprichardson/node-fs-extra) - Node.js: extra methods for the fs object like copy(), remove(), mkdirs(). - [inquirer](https://github.com/SBoudrias/Inquirer.js) - A collection of common interactive command line user interfaces. - [ora](https://github.com/sindresorhus/ora) - Elegant terminal spinner. - [pickitt](https://pickitt.netlify.com/) - When you need a computer to just pick it, reach for Pickitt! +- [semver](https://github.com/npm/node-semver) - The semver parser for node (the one npm uses). - [TypeScript](https://www.typescriptlang.org/) - A typed superset of JavaScript that compiles to plain JavaScript. - [update-notifier](https://github.com/yeoman/update-notifier) - Update notifications for your CLI app. - [validate-npm-package-name](https://github.com/npm/validate-npm-package-name) - Is the given string an acceptable npm package name? @@ -100,3 +102,4 @@ You can choose to use the application in an interactive mode by passing the flag - Some inspiration from the developers behind [create-react-app](https://github.com/facebook/create-react-app). - [Martin Rosenberg](https://github.com/MartinRosenberg) - Beta Tester and Dev Friend :) +- [Craig Lam](https://github.com/siliconeidolon) - Beta Tester and Dev Friend :) diff --git a/gifs/example.gif b/gifs/example.gif index 363bdff..1a2a1ac 100644 Binary files a/gifs/example.gif and b/gifs/example.gif differ diff --git a/gifs/example.yml b/gifs/example.yml index 83c8eba..e6cbf81 100644 --- a/gifs/example.yml +++ b/gifs/example.yml @@ -171,84 +171,82 @@ records: - delay: 100 content: "\r\n" - delay: 500 - content: "\r\nCreating a new CLI app in \e[93m/cool-app\e[39m.\r\n\r\nSource Language: \e[93mJavaScript\e[39m\r\n\r\n\e[?25l\e[36m⠋\e[39m Creating Application directory and package.json\e[2K\e[1G\e[?25h\e[32m✔\e[39m Application Directory and package.json created successfully\r\n\e[?25l\e[36m⠋\e[39m Installing dependencies" - - delay: 82 + content: "\r\nCreating a new CLI app in \e[94m/cool-app\e[39m.\r\n\r\nSource Language: \e[94mJavaScript\e[39m\r\n\r\n\e[?25l" + - delay: 7 + content: "\e[36m⠋\e[39m Creating Application directory and package.json\e[2K\e[1G\e[?25h\e[32m✔\e[39m Application Directory and package.json created successfully\r\n\e[?25l\e[36m⠋\e[39m Installing dependencies" + - delay: 84 content: "\e[2K\e[1G\e[36m⠙\e[39m Installing dependencies" - delay: 80 content: "\e[2K\e[1G\e[36m⠹\e[39m Installing dependencies" - - delay: 80 + - delay: 82 content: "\e[2K\e[1G\e[36m⠸\e[39m Installing dependencies" - delay: 80 content: "\e[2K\e[1G\e[36m⠼\e[39m Installing dependencies" - - delay: 84 + - delay: 85 content: "\e[2K\e[1G\e[36m⠴\e[39m Installing dependencies" - delay: 80 content: "\e[2K\e[1G\e[36m⠦\e[39m Installing dependencies" - - delay: 84 + - delay: 81 content: "\e[2K\e[1G\e[36m⠧\e[39m Installing dependencies" - - delay: 87 + - delay: 98 content: "\e[2K\e[1G\e[36m⠇\e[39m Installing dependencies" - delay: 77 content: "\e[2K\e[1G\e[36m⠏\e[39m Installing dependencies" - - delay: 80 + - delay: 81 content: "\e[2K\e[1G\e[36m⠋\e[39m Installing dependencies" - - delay: 80 - content: "\e[2K\e[1G\e[36m⠙\e[39m Installing dependencies" - - delay: 82 + - delay: 84 content: "\e[2K\e[1G\e[36m⠙\e[39m Installing dependencies" - - delay: 80 + - delay: 79 content: "\e[2K\e[1G\e[36m⠹\e[39m Installing dependencies" - - delay: 80 + - delay: 81 content: "\e[2K\e[1G\e[36m⠸\e[39m Installing dependencies" - - delay: 80 + - delay: 81 content: "\e[2K\e[1G\e[36m⠼\e[39m Installing dependencies" - - delay: 84 + - delay: 81 content: "\e[2K\e[1G\e[36m⠴\e[39m Installing dependencies" - - delay: 80 + - delay: 83 content: "\e[2K\e[1G\e[36m⠦\e[39m Installing dependencies" - - delay: 84 + - delay: 81 content: "\e[2K\e[1G\e[36m⠧\e[39m Installing dependencies" - - delay: 87 + - delay: 83 content: "\e[2K\e[1G\e[36m⠇\e[39m Installing dependencies" - - delay: 77 + - delay: 83 content: "\e[2K\e[1G\e[36m⠏\e[39m Installing dependencies" - - delay: 80 + - delay: 84 content: "\e[2K\e[1G\e[36m⠋\e[39m Installing dependencies" - - delay: 80 + - delay: 84 content: "\e[2K\e[1G\e[36m⠙\e[39m Installing dependencies" - - delay: 44 - content: "\e[2K\e[1G\e[?25h\e[32m✔\e[39m Dependencies installed successfully\r\n\e[?25l\e[36m⠋\e[39m Installing devDependencies" + - delay: 79 + content: "\e[2K\e[1G\e[36m⠴\e[39m Installing dependencies\e[2K\e[1G\e[?25h\e[32m✔\e[39m Dependencies installed successfully\r\n\e[?25l\e[36m⠋\e[39m Installing devDependencies" - delay: 80 content: "\e[2K\e[1G\e[36m⠙\e[39m Installing devDependencies" - - delay: 84 - content: "\e[2K\e[1G\e[36m⠹\e[39m Installing devDependencies" - delay: 83 + content: "\e[2K\e[1G\e[36m⠹\e[39m Installing devDependencies" + - delay: 81 content: "\e[2K\e[1G\e[36m⠸\e[39m Installing devDependencies" - delay: 80 content: "\e[2K\e[1G\e[36m⠼\e[39m Installing devDependencies" - - delay: 83 - content: "\e[2K\e[1G\e[36m⠴\e[39m Installing devDependencies" - delay: 81 + content: "\e[2K\e[1G\e[36m⠴\e[39m Installing devDependencies" + - delay: 80 content: "\e[2K\e[1G\e[36m⠦\e[39m Installing devDependencies" - delay: 80 content: "\e[2K\e[1G\e[36m⠧\e[39m Installing devDependencies" - - delay: 80 + - delay: 81 content: "\e[2K\e[1G\e[36m⠇\e[39m Installing devDependencies" - - delay: 80 + - delay: 83 content: "\e[2K\e[1G\e[36m⠏\e[39m Installing devDependencies" - - delay: 81 + - delay: 83 content: "\e[2K\e[1G\e[36m⠋\e[39m Installing devDependencies" - - delay: 84 - content: "\e[2K\e[1G\e[36m⠙\e[39m Installing devDependencies" - - delay: 80 + - delay: 82 content: "\e[2K\e[1G\e[36m⠙\e[39m Installing devDependencies" - - delay: 84 + - delay: 82 content: "\e[2K\e[1G\e[36m⠹\e[39m Installing devDependencies" - - delay: 83 - content: "\e[2K\e[1G\e[36m⠸\e[39m Installing devDependencies" - delay: 80 + content: "\e[2K\e[1G\e[36m⠸\e[39m Installing devDependencies" + - delay: 79 content: "\e[2K\e[1G\e[36m⠼\e[39m Installing devDependencies" - - delay: 83 + - delay: 80 content: "\e[2K\e[1G\e[36m⠴\e[39m Installing devDependencies" - delay: 81 content: "\e[2K\e[1G\e[36m⠦\e[39m Installing devDependencies" @@ -258,15 +256,17 @@ records: content: "\e[2K\e[1G\e[36m⠇\e[39m Installing devDependencies" - delay: 80 content: "\e[2K\e[1G\e[36m⠏\e[39m Installing devDependencies" - - delay: 81 + - delay: 80 content: "\e[2K\e[1G\e[36m⠋\e[39m Installing devDependencies" - - delay: 84 + - delay: 80 content: "\e[2K\e[1G\e[36m⠙\e[39m Installing devDependencies" - - delay: 73 + - delay: 51 content: "\e[2K\e[1G\e[?25h\e[32m✔\e[39m DevDependencies installed successfully\r\n\e[?25l\e[36m⠋\e[39m Copying template files" - - delay: 14 - content: "\e[2K\e[1G\e[?25h\e[32m✔\e[39m Template files copied successfully\r\n\e[?25l\e[36m⠋\e[39m Replacing values in template files\e[2K\e[1G\e[?25h\e[32m✔\e[39m Values in template files replaced successfully\r\n\r\n\e[92mSuccess!\e[39m Created \e[93mcool-app\e[39m at \e[93m/cool-app\e[39m\r\nInside that directory, you can run several commands:\r\n\r\n\e[36m npm run build\e[39m\r\n Creates a local build.\r\n\r\n\e[36m npm start\e[39m\r\n Starts the application in the terminal.\r\n\r\nWe suggest that you begin by typing:\r\n\r\n\e[36m cd\e[39m /cool-app\r\n \e[36mnpm run build && npm start\e[39m\r\n\r\n\e[93mHappy CLI creating!\e[39m\r\n\e[?25h" - - delay: 5 + - delay: 16 + content: "\e[2K\e[1G\e[?25h\e[32m✔\e[39m Template files copied successfully\r\n\e[?25l\e[36m⠋\e[39m Replacing values in template files\e[2K\e[1G\e[?25h\e[32m✔\e[39m Values in template files replaced successfully\r\n\r\n\e[92mSuccess!\e[39m Created \e[94mcool-app\e[39m at \e[94m/cool-app\e[39m\r\nInside that directory, you can run several commands:\r\n\r\n\e[94m npm run build\e[39m\r\n Creates a local build.\r\n\r\n\e[94m npm start\e[39m\r\n Starts the application in the terminal.\r\n\r\nWe suggest that you begin by typing:\r\n\r\n\e[94m cd \e[39m\e[94m/cool-app\e[39m\r\n \e[94mnpm run build && npm start\e[39m\r\n\r\n\e[94mHappy CLI creating!\e[39m\r\n" + - delay: 63 + content: "\e[?25h" + - delay: 6 content: "$ " - delay: 1000 content: c @@ -344,19 +344,19 @@ records: content: r - delay: 100 content: t - - delay: 500 + - delay: 100 content: "\r\n" - - delay: 475 + - delay: 494 content: "\r\n> cool-app@0.0.0 build /cool-app\r\n> babel src -d build\r\n\r\n" - - delay: 1383 - content: "Successfully compiled 4 files with Babel (931ms).\r\n" - - delay: 501 + - delay: 1299 + content: "Successfully compiled 5 files with Babel (909ms).\r\n" + - delay: 500 content: "\r\n> cool-app@0.0.0 start /cool-app\r\n> node build/index.js -- start\r\n\r\n" - - delay: 487 + - delay: 500 content: "\e[2J\e[0f" - delay: 5 content: "\e[39m\r\n\e[95m ╭──────────────────────────────────────────────╮\e[39m\r\n \e[95m│\e[39m \e[94m __ \e[39m \e[95m│\e[39m\r\n \e[95m│\e[39m \e[94m _________ ____ / / ____ _____ ____ \e[39m \e[95m│\e[39m\r\n \e[95m│\e[39m \e[94m / ___/ __ \\/ __ \\/ /_____/ __ `/ __ \\/ __ \\\e[39m \e[95m│\e[39m\r\n \e[95m│\e[39m \e[94m/ /__/ /_/ / /_/ / /_____/ /_/ / /_/ / /_/ /\e[39m \e[95m│\e[39m\r\n \e[95m│\e[39m \e[94m\\___/\\____/\\____/_/ \\__,_/ .___/ .___/ \e[39m \e[95m│\e[39m\r\n \e[95m│\e[39m \e[94m /_/ /_/ \e[39m \e[95m│\e[39m\r\n\e[95m ╰──────────────────────────────────────────────╯\e[39m\r\n" - - delay: 17 + - delay: 11 content: "\e[?25l\e[32m?\e[39m \e[1mMain Menu\e[22m\e[0m \e[0m\e[2m(Use arrow keys)\e[22m\r\n\e[36m❯ Option 1\e[39m \r\n Option 2 \r\n Option 3 \r\n \e[2m──────────────\e[22m\r\n About \r\n Exit \e[7D\e[7C" - delay: 5000 content: "\r\n\e[?25h" diff --git a/gifs/interactive.gif b/gifs/interactive.gif index e58782b..fe4e55f 100644 Binary files a/gifs/interactive.gif and b/gifs/interactive.gif differ diff --git a/gifs/interactive.yml b/gifs/interactive.yml index 5faa78d..286eecd 100644 --- a/gifs/interactive.yml +++ b/gifs/interactive.yml @@ -200,11 +200,11 @@ records: content: "\r\n" - delay: 500 content: "\e[?25l\e[32m?\e[39m \e[1mPlease select a source language:\e[22m\e[0m \e[0m\e[2m(Use arrow keys)\e[22m\r\n\e[36m❯ JavaScript\e[39m \r\n TypeScript \e[13D\e[13C" - - delay: 1000 + - delay: 500 content: "\e[2K\e[1A\e[2K\e[1A\e[2K\e[G\e[32m?\e[39m \e[1mPlease select a source language:\e[22m\e[0m \e[0m\r\n JavaScript \r\n\e[36m❯ TypeScript\e[39m \e[13D\e[13C" - - delay: 1000 + - delay: 250 content: "\e[2K\e[1A\e[2K\e[1A\e[2K\e[G\e[32m?\e[39m \e[1mPlease select a source language:\e[22m\e[0m \e[0m\e[36mTypeScript\e[39m\e[45D\e[45C\r\n\e[?25h\e[32m?\e[39m \e[1mPlease input your name (used for the 'About' screen, but not required):\e[22m\e[0m \e[0m\e[74D\e[74C" - - delay: 1000 + - delay: 100 content: "\e[2K\e[G\e[32m?\e[39m \e[1mPlease input your name (used for the 'About' screen, but not required):\e[22m\e[0m \e[0mA\e[75D\e[75C" - delay: 100 content: "\e[2K\e[G\e[32m?\e[39m \e[1mPlease input your name (used for the 'About' screen, but not required):\e[22m\e[0m \e[0mAl\e[76D\e[76C" @@ -222,103 +222,103 @@ records: content: "\e[2K\e[G\e[32m?\e[39m \e[1mPlease input your name (used for the 'About' screen, but not required):\e[22m\e[0m \e[0mAlex Lee\e[82D\e[82C" - delay: 100 content: "\e[2K\e[G\e[32m?\e[39m \e[1mPlease input your name (used for the 'About' screen, but not required):\e[22m\e[0m \e[0m\e[36mAlex Lee\e[39m\e[82D\e[82C\r\n" - - delay: 7 - content: "\r\nCreating a new CLI app in \e[93m/Users/alex/Desktop/cool-app\e[39m.\r\n\r\nSource Language: \e[93mTypeScript\e[39m\r\n\r\n\e[?25l\e[36m⠋\e[39m Creating Application directory and package.json\e[2K\e[1G\e[?25h\e[32m✔\e[39m Application Directory and package.json created successfully\r\n\e[?25l\e[36m⠋\e[39m Installing dependencies" - - delay: 81 + - delay: 8 + content: "\r\nCreating a new CLI app in \e[94m/cool-app\e[39m.\r\n\r\nSource Language: \e[94mTypeScript\e[39m\r\n\r\n\e[?25l\e[36m⠋\e[39m Creating Application directory and package.json\e[2K\e[1G\e[?25h\e[32m✔\e[39m Application Directory and package.json created successfully\r\n\e[?25l\e[36m⠋\e[39m Installing dependencies" + - delay: 79 content: "\e[2K\e[1G\e[36m⠙\e[39m Installing dependencies" - delay: 83 content: "\e[2K\e[1G\e[36m⠹\e[39m Installing dependencies" - - delay: 81 + - delay: 83 content: "\e[2K\e[1G\e[36m⠸\e[39m Installing dependencies" - - delay: 80 + - delay: 83 content: "\e[2K\e[1G\e[36m⠼\e[39m Installing dependencies" - - delay: 82 - content: "\e[2K\e[1G\e[36m⠴\e[39m Installing dependencies" - delay: 83 + content: "\e[2K\e[1G\e[36m⠴\e[39m Installing dependencies" + - delay: 84 content: "\e[2K\e[1G\e[36m⠦\e[39m Installing dependencies" - - delay: 80 - content: "\e[2K\e[1G\e[36m⠧\e[39m Installing dependencies" - delay: 81 + content: "\e[2K\e[1G\e[36m⠧\e[39m Installing dependencies" + - delay: 80 content: "\e[2K\e[1G\e[36m⠇\e[39m Installing dependencies" - - delay: 84 + - delay: 82 content: "\e[2K\e[1G\e[36m⠏\e[39m Installing dependencies" - - delay: 83 + - delay: 82 content: "\e[2K\e[1G\e[36m⠋\e[39m Installing dependencies" - - delay: 80 + - delay: 83 content: "\e[2K\e[1G\e[36m⠙\e[39m Installing dependencies" - - delay: 82 - content: "\e[2K\e[1G\e[36m⠹\e[39m Installing dependencies" - delay: 81 - content: "\e[2K\e[1G\e[36m⠸\e[39m Installing dependencies" + content: "\e[2K\e[1G\e[36m⠹\e[39m Installing dependencies" - delay: 80 + content: "\e[2K\e[1G\e[36m⠸\e[39m Installing dependencies" + - delay: 84 content: "\e[2K\e[1G\e[36m⠼\e[39m Installing dependencies" - - delay: 80 + - delay: 84 content: "\e[2K\e[1G\e[36m⠴\e[39m Installing dependencies" - - delay: 80 + - delay: 84 content: "\e[2K\e[1G\e[36m⠦\e[39m Installing dependencies" - - delay: 83 + - delay: 84 content: "\e[2K\e[1G\e[36m⠧\e[39m Installing dependencies" - delay: 84 content: "\e[2K\e[1G\e[36m⠇\e[39m Installing dependencies" - - delay: 83 + - delay: 81 content: "\e[2K\e[1G\e[36m⠏\e[39m Installing dependencies" - - delay: 83 + - delay: 85 content: "\e[2K\e[1G\e[36m⠋\e[39m Installing dependencies" - - delay: 82 + - delay: 83 content: "\e[2K\e[1G\e[36m⠙\e[39m Installing dependencies" - - delay: 81 - content: "\e[2K\e[1G\e[36m⠏\e[39m Installing dependencies\e[2K\e[1G\e[?25h\e[32m✔\e[39m Dependencies installed successfully\r\n\e[?25l\e[36m⠋\e[39m Installing devDependencies" - - delay: 81 - content: "\e[2K\e[1G\e[36m⠙\e[39m Installing devDependencies" - delay: 80 + content: "\e[2K\e[1G\e[?25h\e[32m✔\e[39m Dependencies installed successfully\r\n\e[?25l\e[36m⠋\e[39m Installing devDependencies" + - delay: 83 + content: "\e[2K\e[1G\e[36m⠙\e[39m Installing devDependencies" + - delay: 85 content: "\e[2K\e[1G\e[36m⠹\e[39m Installing devDependencies" - - delay: 81 + - delay: 83 content: "\e[2K\e[1G\e[36m⠸\e[39m Installing devDependencies" - - delay: 80 + - delay: 84 content: "\e[2K\e[1G\e[36m⠼\e[39m Installing devDependencies" - - delay: 81 + - delay: 87 content: "\e[2K\e[1G\e[36m⠴\e[39m Installing devDependencies" - - delay: 81 + - delay: 79 content: "\e[2K\e[1G\e[36m⠦\e[39m Installing devDependencies" - - delay: 82 + - delay: 84 content: "\e[2K\e[1G\e[36m⠧\e[39m Installing devDependencies" - - delay: 83 + - delay: 81 content: "\e[2K\e[1G\e[36m⠇\e[39m Installing devDependencies" - - delay: 84 + - delay: 81 content: "\e[2K\e[1G\e[36m⠏\e[39m Installing devDependencies" - - delay: 80 + - delay: 84 content: "\e[2K\e[1G\e[36m⠋\e[39m Installing devDependencies" - - delay: 83 + - delay: 84 content: "\e[2K\e[1G\e[36m⠙\e[39m Installing devDependencies" - - delay: 80 + - delay: 83 content: "\e[2K\e[1G\e[36m⠹\e[39m Installing devDependencies" - - delay: 80 - content: "\e[2K\e[1G\e[36m⠸\e[39m Installing devDependencies" - delay: 81 + content: "\e[2K\e[1G\e[36m⠸\e[39m Installing devDependencies" + - delay: 80 content: "\e[2K\e[1G\e[36m⠼\e[39m Installing devDependencies" - - delay: 82 + - delay: 84 content: "\e[2K\e[1G\e[36m⠴\e[39m Installing devDependencies" - - delay: 81 + - delay: 85 content: "\e[2K\e[1G\e[36m⠦\e[39m Installing devDependencies" - - delay: 81 + - delay: 86 content: "\e[2K\e[1G\e[36m⠧\e[39m Installing devDependencies" - - delay: 83 + - delay: 79 content: "\e[2K\e[1G\e[36m⠇\e[39m Installing devDependencies" - - delay: 83 + - delay: 80 content: "\e[2K\e[1G\e[36m⠏\e[39m Installing devDependencies" - delay: 80 content: "\e[2K\e[1G\e[36m⠋\e[39m Installing devDependencies" - delay: 80 content: "\e[2K\e[1G\e[36m⠙\e[39m Installing devDependencies" - - delay: 78 + - delay: 80 content: "\e[2K\e[1G\e[?25h\e[32m✔\e[39m DevDependencies installed successfully\r\n\e[?25l\e[36m⠋\e[39m Copying template files" - - delay: 20 - content: "\e[2K\e[1G\e[?25h\e[32m✔\e[39m Template files copied successfully\r\n\e[?25l\e[36m⠋\e[39m Replacing values in template files\e[2K\e[1G\e[?25h\e[32m✔\e[39m Values in template files replaced successfully\r\n\e[?25l\e[36m⠋\e[39m Creating tsconfig.json\e[2K\e[1G\e[?25h\e[32m✔\e[39m tsconfig.json created successfully\r\n\r\n\e[92mSuccess!\e[39m Created \e[93mcool-app\e[39m at \e[93m/Users/alex/Desktop/cool-app\e[39m\r\nInside that directory, you can run several commands:\r\n\r\n\e[36m npm run build\e[39m\r\n Creates a local build.\r\n\r\n\e[36m npm start\e[39m\r\n Starts the application in the terminal.\r\n\r\nWe suggest that you begin by typing:\r\n\r\n\e[36m cd\e[39m /Users/alex/Desktop/cool-app\r\n \e[36mnpm run build && npm start\e[39m\r\n\r\n\e[93mHappy CLI creating!\e[39m\r\n" - - delay: 54 + - delay: 10 + content: "\e[2K\e[1G\e[?25h\e[32m✔\e[39m Template files copied successfully\r\n\e[?25l\e[36m⠋\e[39m Replacing values in template files\e[2K\e[1G\e[?25h\e[32m✔\e[39m Values in template files replaced successfully\r\n\e[?25l\e[36m⠋\e[39m Creating tsconfig.json\e[2K\e[1G\e[?25h\e[32m✔\e[39m tsconfig.json created successfully\r\n\r\n\e[92mSuccess!\e[39m Created \e[94mcool-app\e[39m at \e[94m/cool-app\e[39m\r\nInside that directory, you can run several commands:\r\n\r\n\e[94m npm run build\e[39m\r\n Creates a local build.\r\n\r\n\e[94m npm start\e[39m\r\n Starts the application in the terminal.\r\n\r\nWe suggest that you begin by typing:\r\n\r\n\e[94m cd \e[39m\e[94m/cool-app\e[39m\r\n \e[94mnpm run build && npm start\e[39m\r\n\r\n\e[94mHappy CLI creating!\e[39m\r\n" + - delay: 62 content: "\e[?25h" - - delay: 13 - content: "/ $ " - - delay: 1500 + - delay: 6 + content: "cool-app $ " + - delay: 1000 content: c - delay: 100 content: d @@ -341,8 +341,8 @@ records: - delay: 100 content: p - delay: 100 - content: "\r\n/cool-app $ " - - delay: 250 + content: "\r\ncool-app $ " + - delay: 100 content: "n" - delay: 100 content: p @@ -398,13 +398,13 @@ records: content: "\r\n" - delay: 500 content: "\r\n> cool-app@0.0.0 build /cool-app\r\n> rimraf build && tsc\r\n\r\n" - - delay: 2000 + - delay: 1000 content: "\r\n> cool-app@0.0.0 start /cool-app\r\n> node build/index.js -- start\r\n\r\n" - delay: 500 content: "\e[2J\e[0f" - delay: 5 content: "\e[39m\r\n\e[95m ╭──────────────────────────────────────────────╮\e[39m\r\n \e[95m│\e[39m \e[94m __ \e[39m \e[95m│\e[39m\r\n \e[95m│\e[39m \e[94m _________ ____ / / ____ _____ ____ \e[39m \e[95m│\e[39m\r\n \e[95m│\e[39m \e[94m / ___/ __ \\/ __ \\/ /_____/ __ `/ __ \\/ __ \\\e[39m \e[95m│\e[39m\r\n \e[95m│\e[39m \e[94m/ /__/ /_/ / /_/ / /_____/ /_/ / /_/ / /_/ /\e[39m \e[95m│\e[39m\r\n \e[95m│\e[39m \e[94m\\___/\\____/\\____/_/ \\__,_/ .___/ .___/ \e[39m \e[95m│\e[39m\r\n \e[95m│\e[39m \e[94m /_/ /_/ \e[39m \e[95m│\e[39m\r\n\e[95m ╰──────────────────────────────────────────────╯\e[39m\r\n" - - delay: 12 + - delay: 13 content: "\e[?25l\e[32m?\e[39m \e[1mMain Menu\e[22m\e[0m \e[0m\e[2m(Use arrow keys)\e[22m\r\n\e[36m❯ Option 1\e[39m \r\n Option 2 \r\n Option 3 \r\n \e[2m──────────────\e[22m\r\n About \r\n Exit \e[7D\e[7C" - - delay: 3075 + - delay: 5000 content: "\r\n\e[?25h" diff --git a/package-lock.json b/package-lock.json index 56cd814..cf9c8b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "create-cli-application", - "version": "0.7.0", + "version": "0.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -161,9 +161,9 @@ } }, "@types/node": { - "version": "14.0.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.5.tgz", - "integrity": "sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA==", + "version": "14.0.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.6.tgz", + "integrity": "sha512-FbNmu4F67d3oZMWBV6Y4MaPER+0EpE9eIYf2yaHhCWovc1dlXCZkqGX4NLHfVVr6umt20TNBdRzrNJIzIKfdbw==", "dev": true }, "@types/semver": { @@ -402,25 +402,29 @@ "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==" }, "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" }, "dependencies": { - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "ansi-regex": "^5.0.0" } } } @@ -436,13 +440,6 @@ "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "requires": { "mimic-response": "^1.0.0" - }, - "dependencies": { - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" - } } }, "color-convert": { @@ -488,17 +485,17 @@ "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" }, "copyfiles": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.2.0.tgz", - "integrity": "sha512-iJbHJI+8OKqsq+4JF0rqgRkZzo++jqO6Wf4FUU1JM41cJF6JcY5968XyF4tm3Kkm7ZOMrqlljdm8N9oyY5raGw==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.3.0.tgz", + "integrity": "sha512-73v7KFuDFJ/ofkQjZBMjMBFWGgkS76DzXvBMUh7djsMOE5EELWtAO/hRB6Wr5Vj5Zg+YozvoHemv0vnXpqxmOQ==", "dev": true, "requires": { "glob": "^7.0.5", "minimatch": "^3.0.3", - "mkdirp": "^0.5.1", + "mkdirp": "^1.0.4", "noms": "0.0.0", "through2": "^2.0.1", - "yargs": "^13.2.4" + "yargs": "^15.3.1" } }, "core-util-is": { @@ -526,6 +523,14 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } + }, "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -599,12 +604,13 @@ } }, "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, "fs-extra": { @@ -676,21 +682,6 @@ "p-cancelable": "^1.0.0", "to-readable-stream": "^1.0.0", "url-parse-lax": "^3.0.0" - }, - "dependencies": { - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "requires": { - "mimic-response": "^1.0.0" - } - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" - } } }, "graceful-fs": { @@ -894,13 +885,12 @@ } }, "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "p-locate": "^4.1.0" } }, "lodash": { @@ -992,6 +982,11 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -1007,13 +1002,10 @@ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true }, "ms": { "version": "2.1.2", @@ -1115,12 +1107,12 @@ } }, "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "p-limit": "^2.0.0" + "p-limit": "^2.2.0" } }, "p-try": { @@ -1148,9 +1140,9 @@ } }, "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, "path-is-absolute": { @@ -1559,49 +1551,29 @@ } }, "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "ansi-regex": "^5.0.0" } } } @@ -1640,40 +1612,28 @@ "dev": true }, "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "version": "15.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", + "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", "dev": true, "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^3.0.0", + "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - }, - "dependencies": { - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - } + "yargs-parser": "^18.1.1" } }, "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, "requires": { "camelcase": "^5.0.0", diff --git a/package.json b/package.json index 0c96587..e357312 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "create-cli-application", - "version": "0.8.0", + "version": "0.9.0", "description": "A bootstrapper for creating a cli application with Node.", "bin": { "create-cli-application": "./index.js" diff --git a/src/index.ts b/src/index.ts index 52b2bf5..40f42a0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,7 +11,7 @@ const pkg = require("../package.json"); Sentry.init({ dsn: "https://55c913cc3d394f71ba669fda095698fd@o202486.ingest.sentry.io/5254191", - release: "0.8.0", + release: "0.9.0", }); import { @@ -47,7 +47,7 @@ const main = async (): Promise => { * The program that parses the initial user input */ const program = new commander.Command("create-cli-application") - .version("0.8.0") + .version("0.9.0") .arguments("") .usage(`${chalk.blueBright("")} [options]`) .action((name) => { diff --git a/src/init.ts b/src/init.ts index 5e431ce..ed8cd50 100644 --- a/src/init.ts +++ b/src/init.ts @@ -332,7 +332,7 @@ export const displaySuccessMessage = (applicationName: string): void => { console.log(); console.log("We suggest that you begin by typing:"); console.log(); - console.log(chalk.blueBright(" cd"), root); + console.log(chalk.blueBright(` cd `) + chalk.blueBright(root)); console.log(` ${chalk.blueBright(`npm run build && npm start`)}`); console.log(); console.log(chalk.blueBright("Happy CLI creating!")); diff --git a/src/util.ts b/src/util.ts index f1dee8a..b5de4a5 100644 --- a/src/util.ts +++ b/src/util.ts @@ -121,6 +121,9 @@ export const validateApplicationName = (applicationName: any) => { } }; +/** + * Verifies that the application can run. Needs >= Node v10.0.0 + */ export const verifyNodeVersion = (): void => { if (!semver.satisfies(process.version, ">=10.0.0")) { console.error(