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

Migration tool: convert a CSS file to en elm-css file using PostCSS's css-to-AST #52

Closed
rtfeldman opened this issue Dec 28, 2015 · 13 comments

Comments

@rtfeldman
Copy link
Owner

This would be a great way to convert existing css files to elm-css files. Since PostCSS already has a JS tool for taking in a CSS file and turning it into an AST, this could presumably be accomplished by starting with that and then outputting an elm-css file from that AST.

@colinwahl
Copy link

Is this still something you would like done? I would give it a shot!

@rtfeldman
Copy link
Owner Author

Yes, that would be amazing!!!

On Wed, Jul 20, 2016, 2:46 PM Colin Wahl notifications@github.com wrote:

Is this still something you would like done? I would give it a shot!


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABCxwIFCH23RB605W-bQmR5g0mCJbICYks5qXpcvgaJpZM4G8Dc2
.

@rtfeldman
Copy link
Owner Author

Relevant similar project: https://github.com/eeue56/sass-to-elm

On Wed, Jul 20, 2016, 3:53 PM Richard Feldman richard.t.feldman@gmail.com
wrote:

Yes, that would be amazing!!!

On Wed, Jul 20, 2016, 2:46 PM Colin Wahl notifications@github.com wrote:

Is this still something you would like done? I would give it a shot!


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABCxwIFCH23RB605W-bQmR5g0mCJbICYks5qXpcvgaJpZM4G8Dc2
.

@colinwahl
Copy link

colinwahl commented Jul 25, 2016

After doing some research this weekend, It looks like I just need to write a new Stringifier to change the PostCSS AST into an elm-css file. I'll try to take a stab at it tonight

@attekei
Copy link

attekei commented Oct 20, 2016

Any progress on this @colinwahl?

I'd like to see something like HTML to Elm for CSS, because I feel sometimes that I'm wasting too much time converting existing CSS snippets to Elm code 🙂

If you don't have time, I also could try it, because I'm interested in getting some experience of working with ASTs. The biggest concern is that every single time there is new functionality / breaking changes in elm-css, the converter would be out of date. Do you have any ideas how to tackle that problem?

@eeue56
Copy link
Collaborator

eeue56 commented Oct 20, 2016

I have sass-to-elm here -> https://github.com/eeue56/sass-to-elm

but I haven't touched it in a while

@attekei
Copy link

attekei commented Oct 20, 2016

@eeue56 Cool! I looked at the PostCSS stringifiers, but seems that PostCSS AST is not abstract enough for making conversion to Elm easy... so maybe I simply create a web frontend for sass-to-elm and maybe create some PRs to sass-to-elm if and when I find out-of-date stuff.

@eeue56
Copy link
Collaborator

eeue56 commented Oct 20, 2016

Sass-to-elm has a webfrontend :)

@MarkNijhof
Copy link

Does something like this exist for SCSS to Elm-CSS? Or plain CSS to Elm-CSS has that been created?

@MarkNijhof
Copy link

Ah SASS will compile SCSS it seems

@midorikocak
Copy link

following

@rtfeldman
Copy link
Owner Author

I'm gonna close this for now. If anyone wants to start work on a project like this, please open a new issue!

@michaeljones
Copy link

Just to note, I did some work on a tool for this a while back though it is unpolished and we haven't used it much ourselves: https://github.com/Zaptic/css-to-elm-css

I might be doing so soon though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants