Skip to content

Commit

Permalink
Allow production: true to be passed into the CLI (#529)
Browse files Browse the repository at this point in the history
This adds `--production` cli flag, passed into the sucraseOptions.

Co-authored-by: Matthew Phillips <phillipsm2@gmail.com>
Co-authored-by: Alan Pierce <alangpierce@gmail.com>
  • Loading branch information
3 people committed May 10, 2020
1 parent 8f780a8 commit 9a67974
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default function run(): void {
.option("--enable-legacy-babel5-module-interop", "Use Babel 5 ESM/CJS interop strategy.")
.option("--jsx-pragma <string>", "Element creation function, defaults to `React.createElement`")
.option("--jsx-fragment-pragma <string>", "Fragment component, defaults to `React.Fragment`")
.option("--production", "Disable debugging information from JSX in output.")
.parse(process.argv);

if (commander.project) {
Expand Down Expand Up @@ -87,6 +88,7 @@ export default function run(): void {
enableLegacyBabel5ModuleInterop: commander.enableLegacyBabel5ModuleInterop,
jsxPragma: commander.jsxPragma || "React.createElement",
jsxFragmentPragma: commander.jsxFragmentPragma || "React.Fragment",
production: commander.production,
},
};

Expand Down

0 comments on commit 9a67974

Please sign in to comment.