-
Notifications
You must be signed in to change notification settings - Fork 40
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
But why...? #6
Comments
Yes, compiled CSS options depend on ruby or node.js If your server doesn't depend on either, and you want to use a compiled CSS language, that's painful. Your options are to compile in the development phase, or bite the bullet and include these dependencies. More over, where's your sense of adventure, man! |
Thanks for your comments! I wanted to compile an alternate CSS file like Less per HTTP request in Go HTTP server in development mode without any external libraries, and created this package. |
I would of been happier if the syntax was similar to Less instead of Sass lol. I kinda wish you enforced the { } braces just like how Go enforces them... Feels more consistent. In any case, do you plan on making it production ready... ? Also, you (or someone in the community) will probably have to remove all my other dependencies on nodejs to actually make it worthwhile... for instance uglify-js, html-minifier, and clean-css... then I really don't need to install nodejs :) Sorry I was a bit rude to begin with.. At least your contributing where I'm just complaining!! |
@yosssi Oh that makes sense... may I know your use case for why you need to compile for each request? |
Oh, you like the style of Less... I omitted curly braces and semicolons from the GCSS syntax for making the syntax simple. I think it's a matter of taste.
Yes, I do. I'm going to release version 1.0 (production version) of this package near the end of the year if any issues would not occur until then.
That's a good idea. We have to do a lot of things to remove all dependencies!
No prob. It was my fault because I didn't say why I started to create this package at all.
When I develop a Go web app, I want to compile GCSS files for each request because I can save the time to execute a compile command and restart an HTTP server process. I know I can do it by using the Grunt's watch task but I don't rely on using Node.js when I develop a Go application. |
@yosssi Thanks for the awesome reply. 👍 I just want to warn you that doing compilation on each http request will significantly hurt your req/sec performance... try boom or wrk to test your req/sec scenario for pre-compile vs on-demand compile ... pretty sure you will see huge differences in how many requests you can serve. In fact, if you see that there isn't much of a performance issue, maybe you can post those results in your readme file or here. Thanks! |
@einthusan Thanks for your advice. Yeah, I'll compile a GCSS file for each request only in development mode. I'll use a pre-compiled CSS file in production. |
Oh lol... I didn't know you were doing that.. Well then.. thanks for the chat.. I will mark this as closed! :) |
I don't get it... is this some project to show that Go can be used to do such things or was this really solving a pain point...? Why not just use execute an external program like lessc? Usually compiling from the sever side is done just once.. so am I missing something?
The text was updated successfully, but these errors were encountered: