File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99( async ( ) => {
1010
1111 // Parse ARGS
12- const args = process . argv . slice ( 2 ) ,
13- cacheMode = args . some ( arg => arg . startsWith ( '--cache' ) ) ,
14- devMode = args . some ( arg => arg . startsWith ( '--dev' ) )
12+ const args = process . argv . slice ( 2 )
13+ const config = {
14+ cacheMode : args . some ( arg => arg . startsWith ( '--cache' ) ) ,
15+ devMode : args . some ( arg => arg . startsWith ( '--dev' ) )
16+ }
1517
1618 // Import LIBS
1719 const fs = require ( 'fs' ) , // to read/write files
2426
2527 // Import BUMP UTILS
2628 let bump
27- if ( devMode ) // bypass cache for latest bump-utils.mjs
29+ if ( config . devMode ) // bypass cache for latest bump-utils.mjs
2830 bump = await import ( './bump-utils.mjs' )
2931 else { // import sparsely updated remote bump-utils.min.mjs
3032 fs . mkdirSync ( path . dirname ( cachePaths . bumpUtils ) , { recursive : true } )
4244 }
4345
4446 // Collect userscripts
45- bump . log . working ( `\n${ cacheMode ? 'Collecting' : 'Searching for' } userscripts...\n` )
47+ bump . log . working ( `\n${ config . cacheMode ? 'Collecting' : 'Searching for' } userscripts...\n` )
4648 let userJSfiles = [ ]
47- if ( cacheMode ) {
49+ if ( config . cacheMode ) {
4850 try { // create missing cache file
4951 fs . mkdirSync ( path . dirname ( cachePaths . userJSpaths ) , { recursive : true } )
5052 const fd = fs . openSync ( cachePaths . userJSpaths ,
You can’t perform that action at this time.
0 commit comments