File tree Expand file tree Collapse file tree 1 file changed +22
-6
lines changed
Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,27 @@ var main = require( './../lib' );
1414
1515// FUNCTIONS //
1616
17+ /**
18+ * Performs initialization tasks.
19+ *
20+ * @private
21+ * @example
22+ * init();
23+ */
24+ function init ( ) {
25+ var opts ;
26+
27+ // Check if newer versions exist for this package:
28+ opts = {
29+ 'pkg' : pkg
30+ } ;
31+ notifier ( opts ) . notify ( ) ;
32+
33+ // Set the process title to allow the process to be more easily identified:
34+ process . title = pkg . name ;
35+ process . stdout . on ( 'error' , process . exit ) ;
36+ } // end FUNCTION init()
37+
1738/**
1839* Prints usage information.
1940*
@@ -55,12 +76,7 @@ var args;
5576
5677// MAIN //
5778
58- // Check if newer versions exist for this package:
59- notifier ( { 'pkg' : pkg } ) . notify ( ) ;
60-
61- // Set the process title to allow the process to be more easily identified:
62- process . title = pkg . name ;
63- process . stdout . on ( 'error' , process . exit ) ;
79+ init ( ) ;
6480
6581// Parse command-line arguments:
6682args = parseArgs ( process . argv . slice ( 2 ) , opts ) ;
You can’t perform that action at this time.
0 commit comments