1 | var col = require('colors');
|
2 | exports.show = function(argv){
|
3 |
|
4 | argv = argv.splice(2);
|
5 |
|
6 | if(!argv[0]){
|
7 | console.log("THIS IS THE CLI FOR GENERATE A FAST PROJECT IN ANGULARJS".grey);
|
8 | console.log("Usage".yellow+": ng-make"+ "[keyword]".blue +"[options]".green);
|
9 | console.log("[keyword]: you can obtain info for usage of the passing keyword");
|
10 | console.log("\t---"+"[keyword]".blue+": the keyword are:");
|
11 | console.log("\t\t"+"project".blue+" => Used for create a new project in angular js");
|
12 | console.log("\t\t\t\tUsage: ng-make project nameOfYourApp");
|
13 | console.log("\t\t"+"state".blue+" => Used for create a new state with the controller and template with the same name \n\t\t\t\t"+"!important ( FOR USE THIS YOU MUST BE INSIDE THE PROJECT DIRECTORY )".bgRed.white);
|
14 | console.log("\t\t"+"module".blue+" => Used for create a new module in angular js");
|
15 |
|
16 | }
|
17 |
|
18 | }
|
19 |
|
20 | exports.showGeneralHelp = function(argv,version)
|
21 | {
|
22 | if(!argv[0]){
|
23 | console.log( " __ _ _______ __ __ _______ ___ _ _______ ".bgBlack.green);
|
24 | console.log( "| | | || | | |_| || _ || | | || |".bgBlack.green);
|
25 | console.log( "| |_| || ___| ____ | || |_| || |_| || ___|".bgBlack.green);
|
26 | console.log( "| || | __ |____| | || || _|| |___ ".bgBlack.green);
|
27 | console.log( "| _ || || | | || || |_ | ___|".bgBlack.green);
|
28 | console.log( "| | | || |_| | | ||_|| || _ || _ || |___ ".bgBlack.green);
|
29 | console.log( "|_| |__||_______| |_| |_||__| |__||___| |_||_______|".bgBlack.green);
|
30 | console.log("\nCLI Powered by axc1011".yellow);
|
31 | console.log("version:"+version);
|
32 | console.log("\nFOR OTHER INFO GO AT THE WEB SITE(https://www.npmjs.com/package/ng-make)".red);
|
33 |
|
34 | }else{
|
35 |
|
36 | if(argv[0] == "-help" || argv[0] == "help" || argv[0] == "-h"){
|
37 | console.log(" _ _ _____ _ ____");
|
38 | console.log("| | | | | ____| | | | _ \ ");
|
39 | console.log("| |_| | | _| | | | |_) |");
|
40 | console.log("| _ | | |___ | |___ | __/ ");
|
41 | console.log("|_| |_| |_____| |_____| |_|");
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | console.log("THIS IS THE CLI FOR GENERATE A FAST PROJECT IN ANGULARJS\n".grey);
|
49 | console.log("Usage".yellow+": ng-make"+ "[keyword]".blue +"[options]".green);
|
50 | console.log("\n[keyword]: you can obtain info for usage of the passing keyword");
|
51 | console.log("\t---"+"[keyword]".blue+": the keyword are:");
|
52 | console.log("\n\t\t"+"project".blue+" => Used for create a new project in angular js");
|
53 | console.log("\t\t\t\tUsage: ng-make project nameOfYourApp".yellow);
|
54 | console.log("\t\t"+"state".blue+" => Used for create a new state \n\t\t\t\t"+"!important ( FOR USE THIS YOU MUST BE INSIDE THE PROJECT DIRECTORY )".bgRed.white);
|
55 | console.log("\t\t"+"module".blue+" => Used for create a new module in angular js such as bootstrap and others.");
|
56 | console.log("\t---[options]".blue+" : it's used for specify the parameters available for all keywords\n For the available options for each keyword you can use:".grey);
|
57 | console.log("Usage: ng-make [keyword] help".yellow);
|
58 | console.log("\nFOR OTHER INFO GO TO THE WEB SITE(https://www.npmjs.com/package/ng-make)".red);
|
59 | }else{
|
60 | console.log( " __ _ _______ __ __ _______ ___ _ _______ ".bgBlack.green);
|
61 | console.log( "| | | || | | |_| || _ || | | || |".bgBlack.green);
|
62 | console.log( "| |_| || ___| ____ | || |_| || |_| || ___|".bgBlack.green);
|
63 | console.log( "| || | __ |____| | || || _|| |___ ".bgBlack.green);
|
64 | console.log( "| _ || || | | || || |_ | ___|".bgBlack.green);
|
65 | console.log( "| | | || |_| | | ||_|| || _ || _ || |___ ".bgBlack.green);
|
66 | console.log( "|_| |__||_______| |_| |_||__| |__||___| |_||_______|".bgBlack.green);
|
67 | console.log("\nCLI Powered by axc1011".yellow);
|
68 | console.log("version:"+version);
|
69 | console.log("\n\nKEYWORD not found\n\n");
|
70 | console.log("Please try ng-make -h".yellow);
|
71 | console.log("\nFOR OTHER INFO GO AT THE WEB SITE(https://www.npmjs.com/package/ng-make)".red);
|
72 | }
|
73 | }
|
74 | }
|
75 |
|
76 | exports.showDirectiveHelp= function(isWeb){
|
77 |
|
78 | console.log("USAGE OF DIRECTIVE KEYWORD".grey);
|
79 | if(isWeb){
|
80 | console.log("\t use: directive nameOfDirective".yellow);
|
81 |
|
82 | }else{
|
83 | console.log("\t use: ng-make directive nameOfDirective".yellow);
|
84 |
|
85 | }
|
86 | console.log("\t use: ng-make directive nameOfDirective".yellow);
|
87 | console.log("With this command you can create a new directive for your project.");
|
88 |
|
89 | }
|
90 | exports.showHelpState = function(){
|
91 |
|
92 | console.log("HELP FOR STATE KEYWORDS".yellow.bgBlack);
|
93 | console.log("You can use the state keyword as:");
|
94 | console.log(" state nameOfNewState".yellow);
|
95 | console.log("With this you can create a new state in a angular apps");
|
96 | console.log(" state nameOfNewState default".yellow);
|
97 | console.log("with this command you create a new state and it is the default state at the start point of angular app");
|
98 | console.log(" state nameOfNewState abstract".yellow);
|
99 | console.log("with this command you make the new state created into an abstract state");
|
100 | console.log("Attention:".red+"the state that is the implementation of the abstract state must have the nameOfNewState as:");
|
101 | console.log(" nameOfStateAbstract.nameOfNewState\n\n".yellow);
|
102 |
|
103 |
|
104 | }
|
105 |
|
106 |
|
107 | exports.showHelpModule = function(argv){
|
108 | if(argv.length==1){
|
109 | console.log("ERR: You can't use this command, please try: "+"ng-make module -help".grey);
|
110 | console.log("\nFOR OTHER INFO GO AT THE WEB SITE(https://www.npmjs.com/package/ng-make)".red);
|
111 |
|
112 | }else{
|
113 | if(argv[1] == "-help" || argv[1] == "help" || argv[1] == "-h"){
|
114 | console.log("Help for the option module");
|
115 | console.log("You can use this option with the following keywords:");
|
116 | console.log("\tlist-installed".yellow+" -> shows all modules installed on your project");
|
117 | console.log("\tlist".yellow+" -> shows all modules available for ng-make");
|
118 | console.log("\tinstall nameOfModule".yellow+" -> install the module with the name passed, if it is available for ng-make repository");
|
119 | console.log("-----------------------------------------------------");
|
120 | console.log("In other case you should use this option command with the name of module, that you would to install.".red+"Example: ng-make module nameOfPersonalModule".yellow);
|
121 | console.log("Example of Using: "+"ng-make module install bootstrap".yellow+" to install the bootstrap modules.\n\n");
|
122 | console.log("For add your module put the descriptor on the (http://angelocarraggi.altervista.org/ng-make)");
|
123 | console.log("\nFOR OTHER INFO GO TO THE WEB SITE(https://www.npmjs.com/package/ng-make)".red);
|
124 |
|
125 | }else{
|
126 | return 2;
|
127 | }
|
128 | }
|
129 |
|
130 | }
|
131 |
|
132 | exports.showStateHelp = function(argv){
|
133 | if(argv.length == 1){
|
134 | console.log("ERR: You can try to use this command as :\n".bgWhite.red+" ng-make state nameOfState [default(optional)] [abstract(optional)]".grey);
|
135 | }
|
136 | }
|
137 |
|
138 | exports.showWebServerHelp = function(argv){
|
139 |
|
140 | if(argv.length==1){
|
141 | console.log( " __ _ _______ __ __ _______ ___ _ _______ ");
|
142 | console.log( "| | | || | | |_| || _ || | | || |");
|
143 | console.log( "| |_| || ___| ____ | || |_| || |_| || ___|");
|
144 | console.log( "| || | __ |____| | || || _|| |___ ");
|
145 | console.log( "| _ || || | | || || |_ | ___|");
|
146 | console.log( "| | | || |_| | | ||_|| || _ || _ || |___ ");
|
147 | console.log( "|_| |__||_______| |_| |_||__| |__||___| |_||_______|");
|
148 | console.log("\nCLI Powered by axc1011".yellow);
|
149 | console.log("version:"+version);
|
150 | console.log("Using default value for the server")
|
151 | console.log("Starting your server in http://localhost:9090");
|
152 | }else{
|
153 |
|
154 | }
|
155 |
|
156 | }
|
157 |
|
158 | exports.showWebStart = function(){
|
159 |
|
160 | console.log( "██╗ ██╗███████╗██████╗ ███████╗████████╗ █████╗ ██████╗ ████████╗");
|
161 | console.log( "██║ ██║██╔════╝██╔══██╗ ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗╚══██╔══╝");
|
162 | console.log( "██║ █╗ ██║█████╗ ██████╔╝ ███████╗ ██║ ███████║██████╔╝ ██║ ");
|
163 | console.log( "██║███╗██║██╔══╝ ██╔══██╗ ╚════██║ ██║ ██╔══██║██╔══██╗ ██║ ");
|
164 | console.log( "╚███╔███╔╝███████╗██████╔╝ ███████║ ██║ ██║ ██║██║ ██║ ██║ ");
|
165 | console.log( " ╚══╝╚══╝ ╚══════╝╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ");
|
166 | console.log( " ");
|
167 |
|
168 | }
|
169 |
|
170 | exports.showModule = function(){
|
171 | console.log( "███╗ ███╗ ██████╗ ██████╗ ██╗ ██╗██╗ ███████╗");
|
172 | console.log( "████╗ ████║██╔═══██╗██╔══██╗██║ ██║██║ ██╔════╝");
|
173 | console.log( "██╔████╔██║██║ ██║██║ ██║██║ ██║██║ █████╗ ");
|
174 | console.log( "██║╚██╔╝██║██║ ██║██║ ██║██║ ██║██║ ██╔══╝ ");
|
175 | console.log( "██║ ╚═╝ ██║╚██████╔╝██████╔╝╚██████╔╝███████╗███████╗");
|
176 | console.log( "╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝");
|
177 | console.log( " ");
|
178 | }
|
179 |
|
180 | exports.showServiceHelp = function(isWeb){
|
181 | console.log("USAGE OF SERVICE KEYWORD".grey);
|
182 | if(isWeb){
|
183 | console.log("\t use: service nameOfService".yellow);
|
184 |
|
185 | }else{
|
186 | console.log("\t use: ng-make service nameOfService".yellow);
|
187 |
|
188 | }
|
189 | console.log("With this command you can create a new service for your project.");
|
190 | }
|
191 |
|
192 | exports.showFactoryHelp = function(isWeb){
|
193 | console.log("USAGE OF FACTORY KEYWORD".grey);
|
194 | if(isWeb){
|
195 | console.log("\t use: factory nameOfService".yellow);
|
196 |
|
197 | }else{
|
198 | console.log("\t use: ng-make factory nameOfService".yellow);
|
199 |
|
200 | }
|
201 | console.log("\t use: ng-make factory nameOfService".yellow);
|
202 | console.log("With this command you can create a new factory for your project.");
|
203 | }
|
204 |
|
205 |
|
206 |
|
207 |
|
208 |
|
209 |
|
210 |
|
211 |
|
212 |
|
213 |
|
214 |
|
215 |
|
216 |
|
217 |
|
\ | No newline at end of file |