Answer the question
In order to leave comments, you need to log in
How to load all necessary files from bower folder?
Good day. I use bower + gulp. When I load plugins, libraries through bower, which have only one main file in which everything that is needed for development (for example, jquery.js, normalize.css) then everything is fine, I pull these files from the folder (bower_components) into my folder for libraries and then I do with them what I want. But for example, I downloaded bootstrap 4 and there these files are registered in bower.json:
"main": [ "scss/bootstrap.scss", "dist/js/bootstrap.js" ],
@import "variables";
@import "mixins";
@import "custom";
Answer the question
In order to leave comments, you need to log in
You can try this way
In bower.json reload main for bootstrap
"overrides": {
"bootstrap": {
"main": [
"./assets/stylesheets/**/*.scss"
]
}
gulp.task('bootstrap', function () {
return gulp.src(mainBowerFiles('**/*.{sass,scss}'), {base: __dirname + '/bower_components/bootstrap/'})
.pipe(gulp.dest('./app/css/libs'))
});
If I understand the question correctly and you want to upload files separately, then the gulp-sass plugin (and node-sass, yes, too) has the includePaths option.
In this option, you can list an array of paths to folders, and in main.scss accordingly, you can include files starting from these paths
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question