0

I'm using Broccoli (which uses node-sass) to compile SCSS code for an Ember project, and I'd like to create a SCSS function that reads a named file from the file system, processes it, and returns the result.

So far I haven't been able to find any references on writing a SCSS function that calls out to the file system.

How do I call out of a SCSS function to access the file system when using Broccoli?

EDIT:

I've found this thread about custom functions in node-sass, but it doesn't look like they're available yet.

exupero
  • 9,136
  • 8
  • 47
  • 63
  • 1
    Sass cannot. You have to write custom functions in Ruby to do it. I have no idea how one would do it using LibSass. – cimmanon Jan 21 '15 at 15:42

1 Answers1

0

SCSS or SASS are pre-processing languages to be used with your library (libsass) in order to generate CSS (styles).

If you are using Ember in your project then I suggest you use that to access the file system.

Ember is a Javascript Framework and it's where you should look at to combine it with, for instance, the HTML5 File API. Either that or a call to any back-end language.

ozke
  • 1,622
  • 4
  • 25
  • 44
  • Your question is not about Ember but since you asked, maybe this should help... http://spin.atomicobject.com/2014/01/15/client-side-file-processing-ember-js/ – ozke Jan 21 '15 at 15:56