Open msecret opened 10 years ago
I'd prefer if we didn't require python, ruby, and node to build the app. Maybe just add alternate instructions for grunt/what-have-you in the readme and call it a day? It'd be calling the sass ruby script anyway, no?
From my understanding, the gulp/grunt code will use node-sass (https://github.com/sass/node-sass), which uses lib-sass (c/c++ lib, https://github.com/sass/libsass). This means we could remove the ruby dependency altogether, which I'm in favor of.
I'll probably set this up locally for now to see if it makes a difference. Considering I'm the main front-end developer on this repo right now, I'd be happy to keep it as a local setup until we feel it should be put public.
I wonder, do you think compilation times are slow because it's compiling multiple CSS files? Since we're only using the one (donation.css
), and scss will pull in the dependent files, we don't need to generate the additional CSS files and maps?
Yea that is part of the problem, although any file prefixed with an "_" will not be generated. This means everything in base/ and components/ is not generated.
Another thing I was considering: its possible that it's recompiling bourbon and neat every time. I'm going to research if theres a way to include libs like bourbon but keep compilation times down.
An update on this:
I've determined that part of the slowness was caused by using shared folder in virtualbox, which I've remedied by compiling sass on mac rather then my VM.
I tested with libsass which brought compilation times to ~ 800ms. Currently sass is taking longer then this but is still manageable.
I would still like to remove ruby as a dependency and add node, as I believe this will be much more helpful in the future and is more in line with front end development standards.
Let's do that then, but let's continue to include compiled CSS/ minified JS in the repo so that node isn't a requirement for non-frontend development or deployment (as ruby is not a requirement now).
Please update the readme with instructions for setting up sass + bourbon + neat with grunt/gulp.
Speed is likely and issue with including Bourbon Neat. It may be fixed by using libsass.
The output file, in this case donation.css, is not always generated by compilation, requiring manual intervention to compile it. This is likely a bug with sass. Fixing could entail using a different file watcher, such as gulp, grunt, etc and forcing sass compilation of files.
Both solutions point to a frontend workflow tool like gulp or grunt.