Skip to content

Commit

Permalink
feat(babel): add source type gui
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed May 15, 2024
1 parent d5b6ec3 commit 287911c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion composables/language/javascript/BabelGui.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ const createImportExpressions = useOption('createImportExpressions')
const createParenthesizedExpressions = useOption(
'createParenthesizedExpressions',
)
const sourceType = useOption('sourceType', 'script', true)
const errorRecovery = useOption('errorRecovery')
const ranges = useOption('ranges')
const tokens = useOption('tokens')
// not popular
// const annexB = useOption('annexB')
// const sourceType = useOption('sourceType')
// const sourceFilename = useOption('sourceFilename')
// const startColumn = useOption('startColumn')
// const startLine = useOption('startLine')
Expand Down Expand Up @@ -124,6 +124,15 @@ const throwExpressions = usePlugin('throwExpressions')

<h3 border-t="1 $c-border" pt1 text-center font-bold>Options</h3>

<label>
<span>sourceType</span>
<select v-model="sourceType" p1>
<option value="script">script</option>
<option value="module">module</option>
<option value="unambiguous">unambiguous</option>
</select>
</label>

<details>
<summary cursor-pointer>allow syntaxes...</summary>
<div flex="~ col gap2 wrap" ml3 mt1 text-xs>
Expand Down

0 comments on commit 287911c

Please sign in to comment.