Skip to content

Commit

Permalink
refactor: remove duplicate cli-flags definition (#1873)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorge007 authored Oct 5, 2020
1 parent e250b63 commit 77b7da5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
5 changes: 3 additions & 2 deletions packages/info/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import envinfo from 'envinfo';
import logger from 'webpack-cli/lib/utils/logger';
import options from './options';
import { commands } from 'webpack-cli/lib/utils/cli-flags';
import WebpackCLI from 'webpack-cli';

interface Information {
Expand Down Expand Up @@ -32,7 +32,8 @@ const DEFAULT_DETAILS: Information = {

export default async function info(...args): Promise<string[]> {
const cli = new WebpackCLI();
const parsedArgs = cli.argParser(options, args, true);
const { flags: infoFlags } = commands.find((cmd) => cmd.name === 'info');
const parsedArgs = cli.argParser(infoFlags, args, true);
const infoArgs = parsedArgs.opts;
const envinfoConfig = {};

Expand Down
14 changes: 0 additions & 14 deletions packages/info/src/options.ts

This file was deleted.

0 comments on commit 77b7da5

Please sign in to comment.