lipsumar / design-system-framework

9 stars 2 forks source link

Sass support? #5

Closed Macxim closed 8 years ago

Macxim commented 8 years ago

Do you plan to support Sass at some point?

lipsumar commented 8 years ago

Yes. One of the core idea is that DSF should not get in your way, it's as agnostic as possible. In the case of Sass, it's so popular that support will eventually be built-in. You'll just have to tell DSF via the conf file preprocessor.css = "sass" and it should just work. I chose to start with Less because one of the proof-of-concept example project I intend to publish is Twitter Bootstrap 3 repackaged as components.

Eventually I would like DSF to support some sort of plugins, so that one could easily publish an npm module and hook it to DSF with a simple config (like a grunt/gulp plugin). I do not have a clear idea on how this could work just yet. In the meantime I try to keep such modules as simple as possible:

Even at this early stage, you can simply drop a sass.js file in lib/preprocessors/, expose a process function like this:

module.exports = {
  process: function(input, basePath, callback){
    callback(null, transformCssString(input));
  });
}

And tell DSF you're using sass instead of less as a css preprocessor in the config file.

Currently I'm focusing on the first real-life front-end project: the DSF UI itself. I'll be doing this without a preprocessor as I personally prefer working on vanilla CSS, so this is not a priority.

I try to keep the code around such things (ie. not the core business of DSF) as simple as possible to make it as easy as possible to contribute. It has no documentation yet — even in the code, shame on me — mainly because I'm currently the only contributor, but the code is still very simple at this stage. Should someone be interested in contributing, my priority would immediately shift to documentation.

Macxim commented 8 years ago

Good to know. I have already been playing around with the Sass support on my own. I am definitely willing to contribute :+1:

lipsumar commented 8 years ago

That's great! Because it's 2016 it seems the only logical action now is to create a Slack team. So I did just that! Here is the invite link for the next 48 hours: https://dsf-project.slack.com/shared_invite/MzcxODcxNTk4NjAtMTQ2MTQwNzE4NC0zMTc3YWVlOWQ0

Macxim commented 8 years ago

I was just about to tell you about opening a Gitter chat room but Slack could do the job too. Gitter's integration with GitHub projects is cool though.

lipsumar commented 8 years ago

Did not know Gitter. I do prefer the open nature. Oh look, they have markdown and syntax highlighting. It does seem to make more sense than Slack in this case. Forget slack! https://gitter.im/lipsumar/design-system-framework

lipsumar commented 8 years ago

I started a wiki https://github.com/lipsumar/design-system-framework/wiki