File tree Expand file tree Collapse file tree 3 files changed +25
-3
lines changed
Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ import program from "commander"
55import pkg from "../package.json"
66import selectShell from "select-shell"
77import chalk from "chalk"
8- import inquirer = require ( "inquirer" )
8+ import inquirer from "inquirer"
9+ import fs from "fs"
10+ import path from "path"
911
1012const welcome = `
1113███████╗██╗░░░░░░█████╗░░██╗░░░░░░░██╗░░░░░░██████╗░███████╗░█████╗░░█████╗░████████╗░░░░░░░█████╗░██╗░░░░░██╗
@@ -58,9 +60,14 @@ function nameTheComponent() {
5860 if ( ! isValidateComponentNaming ( nameOfComponent ) ) {
5961 nameTheComponent ( )
6062 }
63+ createComponent ( nameOfComponent )
6164 } )
6265}
6366
67+ function createComponent ( nameOfComponent : string ) {
68+
69+ }
70+
6471function selectTheNameOfTheComponent ( ) {
6572 list . on ( "select" , ( ontions ) => {
6673 shell . echo ( chalk . yellow ( "select the name of the component." ) )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const commander_1 = __importDefault(require("commander"));
1010const package_json_1 = __importDefault ( require ( "../package.json" ) ) ;
1111const select_shell_1 = __importDefault ( require ( "select-shell" ) ) ;
1212const chalk_1 = __importDefault ( require ( "chalk" ) ) ;
13- const inquirer = require ( "inquirer" ) ;
13+ const inquirer_1 = __importDefault ( require ( "inquirer" ) ) ;
1414const welcome = `
1515███████╗██╗░░░░░░█████╗░░██╗░░░░░░░██╗░░░░░░██████╗░███████╗░█████╗░░█████╗░████████╗░░░░░░░█████╗░██╗░░░░░██╗
1616██╔════╝██║░░░░░██╔══██╗░██║░░██╗░░██║░░░░░░██╔══██╗██╔════╝██╔══██╗██╔══██╗╚══██╔══╝░░░░░░██╔══██╗██║░░░░░██║
@@ -48,7 +48,7 @@ function isValidateComponentNaming(name) {
4848 return true ;
4949}
5050function nameTheComponent ( ) {
51- inquirer
51+ inquirer_1 . default
5252 . prompt ( [
5353 {
5454 name : "value" ,
@@ -60,8 +60,11 @@ function nameTheComponent() {
6060 if ( ! isValidateComponentNaming ( nameOfComponent ) ) {
6161 nameTheComponent ( ) ;
6262 }
63+ createComponent ( nameOfComponent ) ;
6364 } ) ;
6465}
66+ function createComponent ( nameOfComponent ) {
67+ }
6568function selectTheNameOfTheComponent ( ) {
6669 list . on ( "select" , ( ontions ) => {
6770 shelljs_1 . default . echo ( chalk_1 . default . yellow ( "select the name of the component." ) ) ;
Original file line number Diff line number Diff line change 1+ interface FunctionalComponentsProps {
2+
3+ }
4+
5+ const FunctionalComponents : React . FC < FunctionalComponentsProps > = ( ) => {
6+ return (
7+ < div > </ div >
8+ )
9+ }
10+
11+ export default FunctionalComponents
12+
You can’t perform that action at this time.
0 commit comments