Gulp-sass compiles sass files using node-sass , which has an object with various options.
sass( { outputStyle: 'expanded', // стиль вывода sourceComments: true, // добавляет комментарий перед селектором в выходном файле о строке где этот селектор в исходном файле. indentType: 'tab', // тип оступа indentWidth: 1, // величина отступа max-10 includePaths: ['dev/scss/base/', 'dev/scss/elements/'] // массив путей подключаемых файлов, вроде как должно решать проблему импортов... }) So, there is a functions object there and quite a bit of it is written in the documentation about it:
This is an experimental LibSass feature. Use with caution.
functions is an object that contains a set of user-defined functions that can be called using Sass files are compiled. They can take zero or more input parameters and should return a value either synchronously
(return ...;)or asynchronously(done();). These parameters will be instances of one of the constructors contained in therequire('node-sass').typeshashes. The return value must be a single name of these types. See the list of available types below: ......
I did not find more detailed documentation, and it is not quite clear for what purposes it can be used.
The importer option argument is also very interesting, as I understand it is used to define the user function for importing include files. I want details.
Knowledgeable people share information, preferably with examples :)