mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Move cliOptions to helper
This commit is contained in:
parent
9ddd105772
commit
20ad66a5de
2 changed files with 12 additions and 6 deletions
|
|
@ -29,15 +29,13 @@ import {
|
|||
writeStorkToml
|
||||
} from './helpers/stork/toml.js'
|
||||
|
||||
import {
|
||||
cliOptions
|
||||
} from '~/helpers/cli-options.js'
|
||||
|
||||
// Setup dotenv
|
||||
dotenv.config()
|
||||
|
||||
const commandArguments = process.argv
|
||||
const cliOptions = {
|
||||
withApi: commandArguments.includes('--with-api'),
|
||||
noLists: commandArguments.includes('--no-lists'),
|
||||
}
|
||||
|
||||
|
||||
function normalizeVersion ( rawVersion ) {
|
||||
const containsNumbers = /\d+/.test( rawVersion )
|
||||
|
|
|
|||
8
helpers/cli-options.js
Normal file
8
helpers/cli-options.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
export const commandArguments = process.argv
|
||||
export const cliOptions = {
|
||||
verbose: commandArguments.includes('--verbose'),
|
||||
|
||||
withApi: commandArguments.includes('--with-api'),
|
||||
noLists: commandArguments.includes('--no-lists'),
|
||||
showMerges: commandArguments.includes('--show-merges'),
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue