Skip to content

Commit

Permalink
updated: Simplify the source code
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaGuarini committed Aug 3, 2023
1 parent f2e7181 commit 4d53569
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ export async function generateOutput(options, input) {

/**
* Parse the user options and dispatch the cli tasks
* @param {Promise<Object>} optionsPromise user options promise
* @param {Object} cliOptions user options passed via CLI
* @returns {*} task output
*/
export async function main(optionsPromise) {
const options = await optionsPromise
export async function main(cliOptions) {
const options = await loadConfig(cliOptions)

switch (true) {
case options.version:
Expand All @@ -142,5 +142,5 @@ export async function main(optionsPromise) {
export { registerPreprocessor, registerPostprocessor } from '@riotjs/compiler'

export default async function run(args) {
return compose(main, loadConfig, optionator.parseArgv)(args).catch(panic)
return compose(main, optionator.parseArgv)(args).catch(panic)
}

0 comments on commit 4d53569

Please sign in to comment.