Answer the question
In order to leave comments, you need to log in
How to get string from scss file in gulp?
Is there a plugin in gulp or npm package that can help to take a string from scss and already perform actions in gulp with this string?
For example.
scss: @include sprite-folder('someFolderName');
js:
var spriteSrc = sprite-folder.getValue();
gulp.src(spriteSrc)
.pipe(...)
Answer the question
In order to leave comments, you need to log in
Gulp has its own packages that collect sprites. Actually, you write all the paths in gulpfile.js itself. Here you can see an example of my gulpfile.js . Everything is detailed there. There will be questions - ask in the comments under the answer.
You can slip a custom function into Sass via functinos
https://www.npmjs.com/package/node-sass
I understand that it will be called for each occurrence
or try to make transformations via
https://www.npmjs.com/package/ gulp-transform
before uploading to Sass
If we are really talking about sprites, then it is better to take a ready-made solution.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question