Skip to content

Commit

Permalink
Added sveltosis to compile.t (#1118)
Browse files Browse the repository at this point in the history
* Added sveltosis to compile

* Refix cli.ts --to and --from

* fmt

* f

---------

Co-authored-by: Sami Jaber <jabersami@gmail.com>
  • Loading branch information
SupaSibs and samijaber authored Apr 20, 2023
1 parent ce73f24 commit 1f80185
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
38 changes: 22 additions & 16 deletions packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,31 @@ OPTIONS
--to=<format>, -t=<format>
Specify output format. <format> can be one of:
- reactNative
- solid
- vue
- react
- template
- html
- customElement
- mitosis
- builder
- swift
- svelte
- liquid
- angular
- alpine
- angular
- builder
- customComponent
- html
- liquid
- lit
- marko
- mitosis
- preact
- qwik
- react
- reactNative
- rsc
- solid
- stencil
- svelte
- swift
- template
- vue
--from=<format>, -f=<format>
Specify input format. <format> can be one of:
Specify input format. <format> can be one of:
- mitosis
- builder
- liquid
- svelte
--list, -l
List available output formats.
--config=<file>, -c=<file>
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/src/commands/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
GeneratorOptions,
MitosisComponent,
parseJsx,
parseSvelte,
Plugin,
Target,
targets,
Expand Down Expand Up @@ -127,6 +128,9 @@ const command: GluegunCommand = {
json = builderContentToMitosisComponent(JSON.parse(data!));
break;

case 'svelte':
json = await parseSvelte(data!);
break;
default:
print.error(`${from_} is not a valid input type`);
process.exit(1);
Expand Down

1 comment on commit 1f80185

@vercel
Copy link

@vercel vercel bot commented on 1f80185 Apr 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please # to comment.