gulp-main-bower-files | Use main-bower-files in a more gulp like way | Frontend Framework library
kandi X-RAY | gulp-main-bower-files Summary
kandi X-RAY | gulp-main-bower-files Summary
[codecov.io] Use [main-bower-files] in a more gulp like way. Use the bower.json file as the source and it will create a vinyl stream for each of the files main-bower-files return when parsing the bower.json.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Returns the directory in the base directory .
gulp-main-bower-files Key Features
gulp-main-bower-files Examples and Code Snippets
Community Discussions
Trending Discussions on gulp-main-bower-files
QUESTION
Here is to minify html file inside gulp as follow
...ANSWER
Answered 2018-May-14 at 04:52Which plugin are you using? Gulp-minify-html? That is deprecated. If you are using that try the option "comments: true" as in :
QUESTION
Using our gulp script, we want to create different compiled & minified css files for vendor (via bower, see screenshot) and custom styles. Our task for the vendor styles does not work as expected, though. We expected it to iterate through the bower_components
, grab the css files, concatenate them, minify them and save the generated vendor.min.css
to dist/styles
. Said vendor.min.css
is not generated, however. We tried commenting some of the .pipe()
commands in the return
statement and suspect that it might have something to do with the concat()
function.
Bower components:
Parts of our gulpfile.js
including the malfunctioning task:
ANSWER
Answered 2017-Nov-25 at 13:50You need to change the components that work together. Use 'main-bower-files' instead of 'gulp-main-bower-files' and exchange 'gulp-concat' with 'gulp-group-concat' to combine as shown below.
I left the double filter in order to get a nicer debug output.
QUESTION
I'm new to Bower and I would like to use Gulp to handle CSS & JS loading and minification.
I've already solved (I hope) JS minification. But with CSS I found several problems, and not all of them I was able to solve:
- CSS files which are not found by
gulp-main-bower-files
plugin. For example CSS styles for jQuery UI. Solved bygulp-add-src
plugin. - Minimizing styles including
@import
command. Solved bygulp-cssimport
plugin. - Image paths in CSS file. Don't know how to solve it when I minimize all CSS into one style. When I minimize CSS with relative paths (for example
background: url('../images/bg1.jpg')
), minimized file has different location than original one, so path is not working. - Fonts paths in CSS file. Also don't know how to solve it. It's the same problem as above. For example with the result of Gulp task below, I'm not able to use Bootstrap icons.
My Gulp task for minify CSS looks like this:
...ANSWER
Answered 2017-Jul-02 at 09:34I finally figured it out!
gulp-clean-css is absolutelly briliant plugin which can handle all of this (both @import
and relative paths). It is just necesary to use first clean-css and THEN concat styles into one file (I did it opposite).
If anyone interested, I attach my entire gulpfile.js
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gulp-main-bower-files
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page