File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change 33var scrape = require ( '../lib/scraper' )
44
55var nodejs = require ( '../lib/scraper-nodejs' )
6- var nodejs_rcs = require ( '../lib/scraper-nodejs-rcs' )
6+ var nodejsRcs = require ( '../lib/scraper-nodejs-rcs' )
77
8- var nodes = { }
8+ var nodesToScrape = [ ]
99var options = {
1010 dryRun : false ,
1111 overwrite : false ,
@@ -23,20 +23,18 @@ process.argv.forEach(function (arg) {
2323 options . dryRun = true
2424 break
2525 case '--nodejs' :
26- nodes . nodejs = nodejs
26+ nodesToScrape . push ( nodejs )
2727 break
2828 case '--nodejs-rcs' :
29- nodes . nodejs_rcs = nodejs_rcs
29+ nodesToScrape . push ( nodejsRcs )
3030 break
3131 }
3232} )
3333
34- if ( ! Object . keys ( nodes ) . length ) {
35- nodes = { nodejs : nodejs }
34+ if ( ! nodesToScrape . length ) {
35+ nodesToScrape = [ nodejs , nodejsRcs ]
3636}
3737
38- for ( var node in nodes ) {
39- if ( nodes . hasOwnProperty ( node ) ) {
40- scrape ( nodes [ node ] , options )
41- }
42- }
38+ nodesToScrape . forEach ( function ( node ) {
39+ scrape ( node , options )
40+ } )
You can’t perform that action at this time.
0 commit comments