Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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