-
Notifications
You must be signed in to change notification settings - Fork 197
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
Comments
Is this still something you would like done? I would give it a shot! |
Yes, that would be amazing!!! On Wed, Jul 20, 2016, 2:46 PM Colin Wahl notifications@github.com wrote:
|
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
|
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 |
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? |
I have sass-to-elm here -> https://github.com/eeue56/sass-to-elm but I haven't touched it in a while |
@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. |
Sass-to-elm has a webfrontend :) |
Does something like this exist for SCSS to Elm-CSS? Or plain CSS to Elm-CSS has that been created? |
Ah SASS will compile SCSS it seems |
following |
I'm gonna close this for now. If anyone wants to start work on a project like this, please open a new issue! |
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. |
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.
The text was updated successfully, but these errors were encountered: