Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flowbite tailwind example output does not compile without post-processing #34

Open
houseofmercy-github opened this issue Apr 24, 2022 · 0 comments

Comments

@houseofmercy-github
Copy link

Trying out https://mbylstra.github.io/html-to-elm with flowbite examples
generates Elm that requires imports and post-processing. Problem mainly
lies in need for qualified Svg imports.

For reference here is a script that works with sed on osx that corrects the output
for the samples on this page https://flowbite.com/docs/components/sidebar

#!/bin/bash

# Fixes output from https://mbylstra.github.io/html-to-elm
# Assumes imports:
#
#  import Html exposing (..)
#  import Html.Attributes exposing (..)
#  import Svg
#  import Svg.Attributes

sed -i .bak \
    -e 's/ d "/ Svg.Attributes.d "/g' \
    -e 's/ svg \[ class "/ Svg.svg [ Svg.Attributes.class "/g' \
    -e 's/ path / Svg.path /g' \
    -e 's/ viewBox "/ Svg.Attributes.viewBox "/g' \
    -e 's/ fill "/ Svg.Attributes.fill "/g' \
    Main.elm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant