| 
									
										
										
										
											2016-05-26 22:17:57 +02:00
										 |  |  | #!/usr/bin/env node | 
					
						
							| 
									
										
										
										
											2016-05-29 22:54:59 +02:00
										 |  |  | import "typings-global"; | 
					
						
							|  |  |  | import * as plugins from "./npmci.plugins"; | 
					
						
							| 
									
										
										
										
											2016-06-09 03:42:12 +02:00
										 |  |  | import * as paths from "./npmci.paths"; | 
					
						
							|  |  |  | let npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot); | 
					
						
							|  |  |  | plugins.beautylog.log("npmci version: " + npmciInfo.version); | 
					
						
							| 
									
										
										
										
											2016-05-30 03:11:13 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-03 01:58:37 +02:00
										 |  |  | import {build} from "./npmci.build" | 
					
						
							| 
									
										
										
										
											2016-06-26 04:54:10 +02:00
										 |  |  | import {clean} from "./npmci.clean"; | 
					
						
							| 
									
										
										
										
											2016-06-25 12:28:51 +02:00
										 |  |  | import {command} from "./npmci.command"; | 
					
						
							| 
									
										
										
										
											2016-05-30 02:28:47 +02:00
										 |  |  | import {install} from "./npmci.install"; | 
					
						
							|  |  |  | import {publish} from "./npmci.publish"; | 
					
						
							| 
									
										
										
										
											2016-06-02 13:08:15 +02:00
										 |  |  | import {prepare} from "./npmci.prepare"; | 
					
						
							| 
									
										
										
										
											2016-06-03 01:58:37 +02:00
										 |  |  | import {test} from "./npmci.test"; | 
					
						
							| 
									
										
										
										
											2016-06-01 06:30:21 +02:00
										 |  |  | import {trigger} from "./npmci.trigger"; | 
					
						
							| 
									
										
										
										
											2016-06-07 12:36:00 +02:00
										 |  |  | import * as NpmciEnv from "./npmci.env"; | 
					
						
							| 
									
										
										
										
											2016-05-26 22:17:57 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-10 08:07:04 +02:00
										 |  |  | export {build} from "./npmci.build" | 
					
						
							|  |  |  | export {install} from "./npmci.install"; | 
					
						
							|  |  |  | export {publish} from "./npmci.publish"; | 
					
						
							| 
									
										
										
										
											2016-05-29 22:54:59 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-25 12:28:51 +02:00
										 |  |  | let smartcli = new plugins.smartcli.Smartcli(); | 
					
						
							|  |  |  | smartcli.addVersion(npmciInfo.version); | 
					
						
							| 
									
										
										
										
											2016-06-25 11:58:33 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-25 12:28:51 +02:00
										 |  |  | // build
 | 
					
						
							|  |  |  | smartcli.addCommand({ | 
					
						
							|  |  |  |     commandName:"build" | 
					
						
							|  |  |  | }).then((argv) => { | 
					
						
							|  |  |  |     build(argv._[1]) | 
					
						
							|  |  |  |         .then(NpmciEnv.configStore); | 
					
						
							|  |  |  | }); | 
					
						
							| 
									
										
										
										
											2016-06-25 11:58:33 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-26 04:54:10 +02:00
										 |  |  | // clean
 | 
					
						
							|  |  |  | smartcli.addCommand({ | 
					
						
							|  |  |  |     commandName:"clean" | 
					
						
							|  |  |  | }).then((argv) => { | 
					
						
							|  |  |  |     clean() | 
					
						
							|  |  |  |         .then(NpmciEnv.configStore); | 
					
						
							|  |  |  | }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-25 12:28:51 +02:00
										 |  |  | // command
 | 
					
						
							|  |  |  | smartcli.addCommand({ | 
					
						
							|  |  |  |     commandName:"command" | 
					
						
							|  |  |  | }).then((argv) => { | 
					
						
							|  |  |  |     command() | 
					
						
							|  |  |  |         .then(NpmciEnv.configStore); | 
					
						
							|  |  |  | }); | 
					
						
							| 
									
										
										
										
											2016-05-29 22:54:59 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-25 12:28:51 +02:00
										 |  |  | // install
 | 
					
						
							|  |  |  | smartcli.addCommand({ | 
					
						
							|  |  |  |     commandName:"install" | 
					
						
							|  |  |  | }).then((argv) => { | 
					
						
							|  |  |  |     install(argv._[1]) | 
					
						
							|  |  |  |         .then(NpmciEnv.configStore); | 
					
						
							|  |  |  | }); | 
					
						
							| 
									
										
										
										
											2016-05-29 22:54:59 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-25 12:28:51 +02:00
										 |  |  | // prepare
 | 
					
						
							|  |  |  | smartcli.addCommand({ | 
					
						
							|  |  |  |     commandName:"prepare" | 
					
						
							|  |  |  | }).then((argv) => { | 
					
						
							|  |  |  |     prepare(argv._[1]) | 
					
						
							|  |  |  |         .then(NpmciEnv.configStore); | 
					
						
							|  |  |  | }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // publish
 | 
					
						
							|  |  |  | smartcli.addCommand({ | 
					
						
							|  |  |  |     commandName:"publish" | 
					
						
							|  |  |  | }).then((argv) => { | 
					
						
							|  |  |  |     publish(argv._[1]) | 
					
						
							|  |  |  |         .then(NpmciEnv.configStore); | 
					
						
							|  |  |  | }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // test
 | 
					
						
							|  |  |  | smartcli.addCommand({ | 
					
						
							|  |  |  |     commandName:"test" | 
					
						
							|  |  |  | }).then((argv) => { | 
					
						
							|  |  |  |     test(argv._[1]) | 
					
						
							|  |  |  |         .then(NpmciEnv.configStore); | 
					
						
							|  |  |  | }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // trigger
 | 
					
						
							|  |  |  | smartcli.addCommand({ | 
					
						
							|  |  |  |     commandName:"trigger" | 
					
						
							|  |  |  | }).then((argv) => { | 
					
						
							|  |  |  |     trigger(); | 
					
						
							|  |  |  | }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | smartcli.startParse(); |