diff --git a/packages/cli/src/__snapshots__/index.test.ts.snap b/packages/cli/src/__snapshots__/index.test.ts.snap index 2a14529d..58f7d7d4 100644 --- a/packages/cli/src/__snapshots__/index.test.ts.snap +++ b/packages/cli/src/__snapshots__/index.test.ts.snap @@ -7,14 +7,9 @@ export { default as File } from './File' `; exports[`cli should not override config with cli defaults 1`] = ` -"import * as React from 'react' -const SvgFile = () => ( - - - -) -export default SvgFile - +"import * as React from "react"; +const SvgFile = () => {"Rectangle 5"}{"Created with Sketch."}; +export default SvgFile; " `; diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index d1b2a371..ae685ccf 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -199,6 +199,9 @@ async function run() { } const programOpts = noUndefinedKeys(program.opts()) + if (programOpts.dimensions) delete programOpts.dimensions + if (programOpts.svgo) delete programOpts.svgo + if (programOpts.prettier) delete programOpts.prettier const opts = (await loadConfig(programOpts, { filePath: process.cwd(), })) as Options