Skip to content

Commit

Permalink
chore: move command handler to before config fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
booc0mtaco committed Feb 9, 2024
1 parent 7529478 commit 25860c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bin/eds-import-from-figma.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
const { default: ora } = await import('ora');
const chalk = require('chalk');

// read in the config from config file, package json "eds", etc.
const { getConfig } = require('./_util');
const config = await getConfig();

// Set up the command structure to output help if the file to load is not specified
const args = yargs(hideBin(process.argv))
.command('$0 <file>', 'Figma variable file to import from', (yargs) => {
Expand All @@ -34,6 +30,10 @@
type: 'boolean',
}).argv;

// read in the config from config file, package json "eds", etc.
const { getConfig } = require('./_util');
const config = await getConfig();

const isVerbose = args.v;
const canWrite = !args.dryRun;

Expand Down Expand Up @@ -177,7 +177,7 @@
);

if (isVerbose) {
console.log(
spinner.succeed(
'updated:',
stats.updated.length,
'skipped:',
Expand Down

0 comments on commit 25860c4

Please sign in to comment.