Introducing my humbe little application, CSS Converter . This is hardly a unique idea or application, but I wanted to build something simple enough and useful enough as a first Ruby on Rails app, while avoiding the cleche’d blog app that I must have done a dozen times in other frameworks.
I consider this small project quite an achievement. It has not been easy for me to focus on my own work and projects. It has been one project after another that has interupted me in my quest to finally get into more depth with Ruby on Rails and so finally to get this project out was very gratifying.
So after goning through Michael Hartl’s excellent Rails Tutorial at least twice, each at different ends of a twelve month period. I wavered and wondered and got busy with different things not related to web development (including life!!) and then finally I got myself together, cleared the ‘todo list’ (cancelled and set aside ‘projects for others’) and just did a project of my own.
I have to say this was the best thing I could have done for my own sense of self esteem and confidence. It is difficult to concentrate on your own work and development at times and to finally get a project out of my own was a very gratifying experience. Michael Hartl’s work has been very helpful as a reference and a learning tool and I’m endlessly satisfied with having purchased the pdf and video’s.
The project.
The project is a simple one. The css converter is intended to be a simple way for sass/scss and css users to convert between the three formats, while also offering useful minifying option so that users can get out of the application a set of css that can be efficiently served by their website.
The most satisfying part of the process was actually digging around in the sass/scss code and working out how to do the conversion. I got a tremendous amount of knowledge and an increased understanding of ruby by looking at how the code worked and how the developer of sass/scss had gone about setting out the application.
I highly recommend to other developers: read other people’s code, especially code of quite popular open source applications, you will learn a lot from it.
The most frustrating part of the process of creating a this as a Rails application was the Asset Pipeline. I’m affraid that the documentation for the Asset Pipeline was not all that I needed. Furthermore, many of the css frameworks, like the rails-compass gem do not properly work with the asset pipeline yet. So after way to much time fiddling with it, I removed it and did the blueprintcss myself.
All in all the project was fun. I still need some tests but I’m looking forward to improving my rails skills with further new projects…
Little help? Unable to see the converted code, just get a message saying Success "sass" converted to "scss" but no converted code is populated, bottom window stays blank.
ReplyDeleteIt has been such a long time since i played with this code.
DeleteMy rough testing here seems to indicate that if you use @include's and other such things, it gives an error, which is unfortunate. Basic scss code without the keywords seems to work though, but its no better than using the scss or sass ruby gem from the command line to convert your code (which you can do by the way).
# Convert Sass to SCSS
$ sass-convert style.sass style.scss
# Convert SCSS to Sass
$ sass-convert style.scss style.sass
http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html
Hope this helps...
Michael