It is necessary to tell Sass the "include paths" , the places where the files of additional libraries are expected, so that the import is as dull as possible, does not count on anything and is easily transferred to any tolerable build system (at least to the same Compass). Import of this type:
@import "susy";
This imports the _susy.scss or _susy.sass from the current folder or "include paths" .
And here begin quite funny problems. Different libraries publish their file paths in different ways. But in the end, in gulpfile.js should get a structure of this type:
sass({ includePaths: [путь] // здесь должны быть перечислены пути к используемым библиотекам })
It remains to find a путь . There are good people who export paths at the entry point * , but the authors of Susy indicated the SCSS file as the entry point. Quite a mysterious move, but you can get the path to it and cut off the file name, leaving only the folder:
path = require('path') susy_main = require.resolve('susy') // получение абсолютного пути к точке входа susy susy_dir = path.dirname(susy_main) // путь, полный, с точкой входа, но нужна только папка
Everything, the necessary way (absolute!) Lies in susy_dir .
* Modules in NodeJS are usually packaged in folders of the same name, and when require(название) is done, an object is returned that exports its entry point : the file specified in package.json under the key "main" (and if there is no such key, it will guess see instructions ). Following the example of the link above, here is an indication of the entry point to Bourbon .