Skip to content

Commit

Permalink
repl: add pipeline proposals Hack and Elixir, remove Smart
Browse files Browse the repository at this point in the history
  • Loading branch information
lightmare committed Jul 7, 2021
1 parent 2a2f1d5 commit 6d0577d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
33 changes: 15 additions & 18 deletions js/repl/ReplOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ const PRESET_ORDER = [
"stage-0",
];

const PIPELINE_PROPOSALS = {
minimal: "Minimal",
fsharp: "F#",
hack: "Hack",
elixir: "Elixir",
};

// These presets are deprecated. We only show them if they are enabled, so that
// when they are enabled because of an old URL or local storage they can still
// be disabled.
Expand Down Expand Up @@ -451,24 +458,14 @@ class ExpandedContainer extends Component<Props, State> {
t => t.value
)}
>
<option
value="minimal"
selected={presetsOptions.pipelineProposal === "minimal"}
>
Minimal
</option>
<option
value="smart"
selected={presetsOptions.pipelineProposal === "smart"}
>
Smart
</option>
<option
value="fsharp"
selected={presetsOptions.pipelineProposal === "fsharp"}
>
F#
</option>
{Object.keys(PIPELINE_PROPOSALS).map(key => (
<option
value={key}
selected={key === presetsOptions.pipelineProposal}
>
{PIPELINE_PROPOSALS[key]}
</option>
))}
</select>
</PresetOption>
</AccordionTab>
Expand Down
4 changes: 2 additions & 2 deletions js/repl/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type BabelPlugin = {
export type PresetsOptions = {
decoratorsLegacy: boolean,
decoratorsBeforeExport: boolean,
pipelineProposal: "smart" | "minimal" | "fsharp",
pipelineProposal: "minimal" | "fsharp" | "hack" | "elixir",
reactRuntime: "classic" | "automatic",
};

Expand Down Expand Up @@ -133,7 +133,7 @@ export type ReplState = {
version: any,
decoratorsLegacy: boolean,
decoratorsBeforeExport: boolean,
pipelineProposal: "minimal" | "smart" | "fsharp",
pipelineProposal: "minimal" | "fsharp" | "hack" | "elixir",
reactRuntime: "classic" | "automatic",
externalPlugins: ?string,
};
Expand Down

0 comments on commit 6d0577d

Please sign in to comment.